A woman who almost entirely severed her husband's penis with a knife because he criticised her sexual skills has been sentenced to six months in prison.

Umidah Setu, an Indonesian living in Malaysia, pleaded guilty in court on Tuesday in the southern city of Johor Bahru to voluntarily causing hurt, local newspapers reported. Neighbours alerted by screams rushed the man, named in local reports as Qumarodin Bajuri, an Indonesian contract worker, to hospital on SaturdayFortunately, doctors managed to reattach the organ. The man filed a police report the next day.

Umidah, who is in her late 40s and has two children from her 17-year marriage, said she had taken action after her husband criticised her lack of sexual skills compared to his second wife.

Muslim men in Malaysia are allowed to take up to four wives. It is not known if she will appeal the sentence.