An Islamic court in northern Nigeria has discharged and acquitted a woman who had been sentenced to death by stoning for adultery.
After the ruling Ms Ibrahim thanked those who had helped her
The judge said that the original sentencing of Hajara Ibrahim, 18, had been wrong.
At a previous court appearance in Dass, Bauchi state, the defence said Ms Ibrahim's marriage was not consummated, so she could not be guilty of adultery.
The case had attracted widespread interest in Nigeria and further afield.
"I am happy that I have been acquitted," Ms Ibrahim, told AFP after the ruling.
"I thank God and those that helped me through this trying moment."
The lower court had sentenced Ms Ibrahim to 100 lashes and death by stoning after she confessed to having unlawful sex with a 35-year-old man, Dauda Sani.
Mr Sani was freed due to lack of evidence.
Nobody has been lawfully stoned to death in Nigeria in the four years since 12 states in the north introduced Sharia law, as all such sentences have been overturned on appeal, reports say.