An Islamic court in Malaysia has found a 30-year-old woman guilty of prostitution and sentenced her under sharia law to caning as well as six months in jail.

The woman, a single mother, pleaded guilty to offering sexual services but said she had resorted to prostitution to earn money to raise her child since she received no financial support from her former husband.

The court issued its sentence Thursday according to Islamic laws forbidding prostitution, in what will be the third caning in the eastern state of Terengganu, ruled by the Pan-Malaysian Islamic Party (PAS).

Earlier this month, two Malaysian women were caned before 100 spectators for having lesbian sex in violation of Islamic law, in what was reportedly the first time that women in Malaysia have been caned for infringing a sharia regulation prohibiting same-sex relations.

The Malaysian Prime Minister, Mahathir Mohamad, later denounced the caning of the two women in response to waves of criticism, saying that the punnishment “does not reflect justice and tolerance in Islam.”

In the case of Thursday’s conviction, the prosecutor argued that prostitution was very bad for society and deserved to be punished.

“Even though the offense does not involve a victim, it has a negative impact by destroying societal institutions, introducing sexually-transmitted diseases, and has a bad influence on the youth,” said the prosecutor, Muhammad Khasmizan Abdullah.

Responding to criticisms that the court was singling out women for this humiliating punishment, Mr. Khasmizan said that the state was just prosecuting crimes in which the perpetrators happened to be women.

“Men are caned if they commit such crimes too, so the issue of gender does not arise,” he said.

Follow Thomas D. Williams on Twitter Follow @tdwilliamsrome