The 25-year-old woman used a knife to defend herself from the assault of a man who stormed her house in the central province of Punjab.
The woman told police she was alone at home when the man broke in and tried to overpower her. The woman then ran to the kitchen, grabbed a knife and cut off his penis when he again tried to assault her. Police official Mohamed Ilyas told the DPA news agency.
The man, 28, was rushed to the Civil Hospital in the nearby city of Faisalabad where he received treatment for his injuries.
According to Assistant Superintendent of Police (ASP) Jaranwala Bilal Sulehri, the man and the woman knew each other and the man was due to be marrying someone else.
An investigation into the incident has been launched.
It is understood he has since been released.
Hundreds of women are raped in Pakistan each year, but those who commit the assaults are rarely punished due to weak laws and complicated procedures for prosecution, according to Human Rights Commission of Pakistan.
Rape victims are often blamed for their assaults, accused of socialising with men – something frowned upon in conservative Muslim societies – or of bringing the attack on themselves.
Many women remain silent and decline to file a police report to avoid being named and shamed by Pakistan’s conservative society, advocacy group Aurat Foundation said.