A Nigerian Islamic court has sentenced a man to six months in prison and fined him $38 for living as a woman for seven years in the northern city of Kano.
Abubakar Hamza has become a big celebrity in northern Nigeria
The judge told 19-year-old Abubakar Hamza, who used his female identity to sell aphrodisiacs, to desist from "immoral behaviour".
Mr Hamza, who appeared in court dressed in a pink kaftan and matching cap, said he was now "a reformed man".
Since his arrest, he has become a celebrity in the strict Muslim city.
Posters of him dressed in women's clothing have been selling well.
Leading a double life, Mr Hamza had a wife in his village, but in town lived as a woman in quarters reserved for married Muslim women.
He used his female identity, Fatima Kawaji, to sell herbal aphrodisiacs to women.
Until his arrest, Mr Hamza lived with the Adamu family, who fondly called him Kawajo which in the Fulani language means friend.
The family's teenage daughters did not suspect he was not a girl, despite the fact that he always dressed and undressed in the bathroom.
"It is hoped that you have learnt some lessons during your trial and I hope you will be of good character and desist from this immoral behaviour of posing as a woman," Judge Lawal Isa Rabo said.
A Kano resident present in the court paid the fine on Mr Hamza's behalf and having already spent nine months in jail, he left the Sharia court a free man.
"I am grateful to them for paying the fine," Mr Hamza told the BBC's Hausa service.
But he called on the Kano state government to help him find a job.
"I used my previous identity [as a woman] to earn my livelihood, now that I have stopped that, I need a job."
When questioned about his high pitched voice, he said: "God makes people differently."
"This is how my voice is... and you know when you live with women and you are close to them, you take up their ways."
He was charged under the Prostitution and Immoral Acts law of the Sharia penal code, which was reintroduced in Kano in 2000.