Pakistani law passed in 2006
The Women's Protection Bill () which was passed by the National Assembly of Pakistan on 15 November 2006 is an attempt to amend the heavily criticised 1979 Hudood Ordinance laws which govern the punishment for rape and adultery in Pakistan. Critics of the Hudood Ordinance alleged that it made it exceptionally difficult and dangerous to prove an allegation of rape, and thousands of women had been imprisoned as a result of the bill. The bill returned a number of offences from the Zina Ordinance to the Pakistan Penal Code, where they had been before 1979, and created an entirely new set of procedures governing the prosecution of the offences of adultery and fornication. Whipping and amputation were removed as punishments. The law meant women would not be jailed if they were unable to prove rape and their complaints of rape would not be seen as confession of adultery.
Some religious parties have called the bill un-Islamic and by extension unconstitutional, however the Supreme Court of Pakistan has not overturned the bill on the grounds that it violates the Islamic provisions in Pakistan's constitution, hence it stands to the present day. The province of Punjab passed another women's bill which instituted further reforms. This is pending before the courts on grounds of unconstitutionality.
In 2016, Criminal Law (Amendment) (Offense of Rape) Act 2016 was passed by Pakistan's parliament which introduced harsher punishments for perpetrators of rape and honour killing. The new law provided legal aid to victims and DNA testing was made mandatory in rape cases. The law also required Police to record the statement of the female survivor of rape or sexual harassment in the presence of female police officer. The use of technology such as video links will also be permitted under the new law to record the statements of the victim and witnesses so that they won't have to face any humiliation or risk entailed by court appearances. The new law was hailed by Phumzile Mlambo-Ngcuka, Executive Director of UN Women.
Impact.
The Hudood Ordinances, enacted by military ruler Zia ul-Haq in 1979, criminalise adultery and non-marital consensual sex. They also made a rape victim liable to prosecution for adultery if she cannot produce male witnesses to the assault. However, According to Mufti Taqi Usmani, who was instrumental in the creation of the ordinances:If anyone says that she was punished because of Qazaf (false accusation of rape) then Qazaf Ordinance, Clause no. 3, Exemption no. 2 clearly states that if someone approaches the legal authorities with a rape complaint, she cannot be punished in case she is unable to present four witnesses. No court of law can be in its right mind to award such a punishment.A 2003 report by the National Commission on Status of Women (NCSW) estimated "80% of women" were incarcerated because "they had failed to prove rape charges and were consequently convicted of adultery." 
According to legal scholar Martin Lau 
While it was easy to file a case against a woman accusing her of adultery, the Zina Ordinance made it very difficult for a woman to obtain bail pending trial. Worse, in actual practice, the vast majority of accused women were found guilty by the trial court only to be acquitted on appeal to the Federal Shariat Court. By then they had spent many years in jail, were ostracized by their families, and had become social outcasts. 
Attention to the Ordinance and suggestions for revising it were given by a number of government appointed commissions, a televised several weeks-long-televised debate on the subject of "No debate on Hudood Allah (Allah's laws as prescribed in Quran and Sunnah)-is the Hudood Ordinance (Man's
interpretation of Allah's law) Islamic?" on Geo television channel, and a 2005 University of Karachi Dept of Public Administration workshop.
The new Women's Protection Bill brings rape under the Pakistan Penal Code rather than Hudood Ordinance. The Bill removes the right of police to detain people suspected of having sex outside of marriage, instead requiring a formal accusation in court. Under the changes, adultery and non-marital consensual sex is still an offence but now judges would be allowed to try rape cases with Pakistani Penal code.
The amendments change the punishment for someone convicted of having consensual sex outside marriage to imprisonment of up to five years and a fine of Rs 10,000. Rape would be punishable with 10 to 25 years of imprisonment but with death or life imprisonment if committed by two or more persons together, while adultery would remain under the Hudood ordinance and is punishable with stoning to death. A complaint of adultery must be made to a judge with at least four witnesses testifying under oath that they witnessed the act of penetration. It is the change in the punishment for fornication and rape which is the major source of controversy. 
The Bill also outlaws statutory rape i.e. sex with girls under the age of 16.
Controversy.
Under the Hudood Ordinance, women were routinely jailed for adultery on flimsy evidence, often when a former husband refused to recognise a divorce. It is alleged that the legislation led to thousands of women being imprisoned without being proved whether they were actually guilty. This risk of imprisonment, it is contended, has kept many women from trying to bring their attackers to justice. The Commission of Inquiry on Women, headed by Justice Nasir Aslam Zahid, had recommended the repeal of the Hudood Ordinances in 1997, as did the National Commission on the Status of Women in 2002. The Women's Protection Bill is intended to amend Hudood Ordinance to address these issues.
On the other hand, the bill has been fiercely criticised by right wing Islamist groups in Pakistan, and religious parties boycotted the parliamentary vote on the bill on the basis that it was inaugurating an era of "free sex." The Religious political parties argue that the bill goes against articles 2a and 227 of the Constitution of Pakistan, which state respectively that "Islam will be the state religion" and "No laws will be passed which are repugnant to the Quran and Sunnah." Ayman al-Zawahiri of al-Qaeda warned Pakistanis in a video released in April 2006 that the bill was an attempts to erode Pakistan's adultery law and part of a "Crusader" plot to portray Islam as a religion of "enlightened moderation".
The government has called the legislation "historic" and says that it does not go against the tenets of Islam. (The bill does not eliminate the Hudood punishment of stoning for adultery.) Liberal politicians and women's rights activists have welcomed the reforms as progress – but say they do not go far enough.
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.