Punishment for rape in Pakistan under the Pakistani laws is either death penalty or imprisonment of between ten and twenty-five years. For cases related to gang rape, the punishment is either death penalty or life imprisonment. DNA test and other scientific evidence are used in prosecuting rape cases in Pakistan.

Rape in Pakistan came to international attention after the politically sanctioned rape of Mukhtaran Bibi. The group War Against Rape (WAR) has documented the severity of rape in Pakistan, and the police indifference to it. According to Women's Studies professor Shahla Haeri, rape in Pakistan is "often institutionalized and has the tacit and at times the explicit approval of the state". According to late lawyer Asma Jahangir, who was a co-founder of the women's rights group Women's Action Forum, up to 72% of women in custody in Pakistan are physically or sexually abused.

Approximately 4,326 cases of rape were reported in the year 2018 followed by 4,377 rape cases in 2019, 3,887 cases in 2020 and 1,866 cases in 2021. The Human Rights Ministry of Pakistan stated that the reports of rape, violence and workplace harassment have gradually and consecutively lowered in the years 2018, 2019, 2020 and 2021 respectively. Critics say that the conviction rate in the country is low as rape cases in Pakistan take years to prosecute. Rampant corruption in the lower judiciary and political influence can also help the rapist escape punishment.

In 2019, the government of Pakistan established more than 1,000 special courts across the country. These special courts would focus only on addressing the issues related to violence against women in Pakistan. The establishment of special courts were hailed by many human rights organizations.

History 1947 and 1979 Prior to 1979, Section 375 of the Pakistan Penal Code stated that girls younger than the age of fourteen were prohibited from sex acts even if consent was acquired. Despite this, the previous laws also claims that rape during marriage is not considered rape as long as if the wife is over the age of fourteen.

In 1979, the Pakistani legislature made rape and adultery offences for the first time in the country's history, with the passage of The Offence of Zina (Enforcement Of Hudood) Ordinance, 1979. The Ordinance changed the punishment for such offences from imprisonment and fines, to punishments such as stoning to death. Although this new law is stated to protect women, it reinforces that in order to do so there must be concrete evidence. The evidence was most commonly deemed to be a witness who could testify that the rape actually occurred. In 1979, the witness had to be deemed as credible and honest by the Qazi.

According to the Ordinance, rape is defined as:

2006 Women Protection Bill

On 15 November 2006, National Assembly of Pakistan passed Women Protection Bill to amend the heavily criticised 1979 Hudood Ordinance laws. Under the new bill, death penalty for extramarital sex and the need for victims to produce four witnesses to prove rape cases were removed. Death penalty and flogging for people convicted of having consensual sex outside marriage was removed. However, Consensual sex outside marriage was still treated as a criminal offense with a punishment of five years in prison or a fine of US$165.

Under the Women Protection Bill rape is described as a man who has sexual intercourse with a woman:

The punishment for rape under 2006 Women Protection Bill is either death or imprisonment of between ten and twenty-five years. For cases related to gang rape, the punishment is either death penalty or life imprisonment.

Criminal Law (Amendment) (Offense of Rape) Act 2016 On 7 October 2016, Pakistan's parliament unanimously passed a new anti-rape and anti-honour killing bills. The new laws introduced harsher punishments for the perpetrators of such crimes. According to the new anti-rape bill, DNA testing was made mandatory in rape cases. Sabotaging or disrupting the work of a police officer or Government official could result in imprisonment of 1 year under the new law. Government officials who are found taking advantage of their official position to commit act of rape (e.g. custodial rape) are liable to imprisonment for life and a fine. According to the new law, anyone who rapes a minor or a mentally or physically disabled person will be liable for the death penalty or life imprisonment.

Recording of statement of the female survivor of rape or sexual harassment shall be done by an Investigating Officer, in the presence of a female police officer, or a female family member of the survivor. Survivors of rape shall be provided legal aid (if needed) by the Provincial Bar Council. The new law also declares that trials for offences such as rape and related crimes shall be conducted in-camera and also allows for the use of technology such as video links to record statements of the victim and witnesses, to spare them the humiliation or risk entailed by court appearances. The media will also be restricted from publishing or publicising the names or any information that would reveal the identity of a victim, except when publishing court judgements. The trial for rape shall conclude within three months. However, if the trial is not completed within three months then the case shall be brought to the notice of the Chief Justice of the High Court for appropriate directions. The new bill also ensures that sex workers are also included in the law's protection.

UN Women Executive Director, Phumzile Mlambo-Ngcuka, hailed the Government of Pakistan's decision to pass the anti-rape and anti-honour killing bills.

Virginity tests In 2021, Lahore High Court banned the use of virginity tests in cases where women claim they were raped.🖉

Notable cases Since 2000, various women and young girls have begun to speak out after being sexually assaulted. Going against the tradition that a woman should suffer in silence, they have lobbied news outlets and politicians. A recent report from the Human Rights Commission of Pakistan estimated that in 2009, 46 percent of unlawful female killings in Pakistan were "honour killings".

In 2002, 30-year-old Mukhtaran Bibi (Mukhtār Mā'ī) was gang raped on the orders of the village council as an "honour rape" after allegations that her 12-year-old brother had had sexual relations with a woman from a higher caste. Although custom would expect her to commit suicide after being raped, Mukhtaran spoke up, and pursued the case, which was picked up by both domestic and international media. On 1 September 2002, an anti-terrorism court sentenced 6 men (including the 4 rapists) to death for rape. In 2005, the Lahore High Court cited "insufficient evidence" and acquitted 5 of the 6 convicted, and commuted the punishment for the sixth man to a life sentence. Mukhtaran and the government appealed this decision, and the Supreme Court suspended the acquittal and held appeal hearings. In 2011, the Supreme Court too acquitted the accused. Mukhtār Mā'ī's story was the subject of a Showtime (TV network) documentary called Shame, directed by Mohammed Naqvi, which won awards including a TV Academy Honor (Special Emmy) of the Academy of Television Arts and Sciences. A 23-year-old woman in Faisalabad made public accusations against the police, saying her husband had been arrested for creating forged documents; she alleges she was raped on the orders of the chief of police for her actions. The officer was suspended but not arrested. Kainat Soomro was a 13-year-old schoolgirl when she was kidnapped and gang raped for four days. Her protest has led to the murder of her brother, a death sentence from the elders of her village, and threats from the rapists, who after four years still remain at large. In 2012, three members of the Border Police were remanded into custody for raping five women aged between fifteen and twenty-one. The women claim they were taken from a picnic area to the police station in Dera Ghazi Khan, where the police filmed themselves sexually assaulting the women. In January 2014, a village council ordered gang-rape that was carried out in the same Muzaffargarh district where the Mukhtaran Bibi took place in 2002.Malik Tahseen Raza, 'Panchayat returns, orders 'gang-rape'', Dawn, 31 January 2014 In the 2014 Layyah rape murder incident, on 19 June 2014, a 21-year-old woman was gang raped and murdered in Layyah district, Punjab province of Pakistan. In September 2014, three sons of Mian Farooq, a ruling party parliamentarian from Faisalabad, were accused of abducting and gang raping of a teenage girl. The rapists were later released by the court. In July 2017, a panchayat ordered rape of a 16-year-old girl in Multan as punishment for her brother's conduct. In December 2017, a 25-year-old woman was gang-raped by four dacoits during a robbery at her house in Multan. In January 2018, a seven-year-old girl named Zainab Ansari was raped and strangled to death in Kasur. The incident caused nationwide outrage in Pakistan. The same month, a 16-year-old girl was raped and killed in Sargodha, and a day later, in the same city, a 13-year-old boy was intoxicated and sexually assaulted by two men belonging to an influential family. In Faisalabad, the same day, a 15-year-old boy was found dead. The later medical reports confirmed a sexual assault. A few days later, the dead body of a 3-year-old girl, named Asma, was found in Mardan, who had been reportedly missing for 24 hours. Her postmortem report points that she had been raped before her murder. These unfortunate events caused to shape more proactive role and participation in Pakistan's women's rights movements like 'Me Too movement' and Aurat March. UNODC Goodwill Ambassador Shehzad Roy collaborated with Bilawal Bhutto to introduce awareness about education against child sexual abuse in Sindh.