Activists have long condemned the laws for punishing, instead of protecting, rape victims while providing legal safeguards for their attackers.
But conservatives and opposition supporters have rallied to keep the old laws, which were introduced by general Zia ul-Haq, the sixth president of Pakistan, to make laws more Islamic.
"Protection of Women Bill"
The government-controlled senate passed the amendments in an evening vote, said Mohammed Ali Durrani, the Pakistani information minister.
The legislation, dubbed the "Protection of Women Bill", came a week after it cleared the lower house of parliament.
The new law would drop the death penalty for people found to have had sex outside of marriage, and empowers judges with the ability to try a rape case in a criminal court or an Islamic court.
Under the Hudood Ordinance, rape victims can only raise a case in the Islamic court, which requires testimony from four witnesses to the crime.
"The approval of the bill by the Senate is a great thing," said Mehnaz Rafi, a female politician who has worked to change the law for 27 years.
"Today, the senate gave protection and justice to women."
Under the new law, consensual non-marital sex remains a crime, but it is punishable by five years in prison or a 10,000 rupees ($165) fine instead of death.
Calls for change
International and local calls for change intensified after the 2002 gang-rape of a woman, Mukhtar Mai, who was assaulted after a tribal council in her eastern Punjab village ordered the rape as punishment for her 13-year-old brother's alleged affair with a woman of a higher caste.
Ahead of Thursday's vote, senator Khurshid Ahmed, leader of the opposition religious coalition, condemned the bill as "an attempt to promote an alien culture and secularism in Pakistan".
Discussion on the new bill broke down in September after the government failed to win support from opposition Islamic groups, particularly for abolishing the need for four witnesses to a rape, which is a crime that often has no bystanders.
In a compromise, the government proposed the clause allowing a judge to try cases in either a criminal court or in an Islamic court.
The new bill also removes the right of police to detain people suspected of having sex outside of marriage, instead requiring an individual to make a formal accusation directly to a court and not the police.