ISLAMABAD, Pakistan (AP) _ Pakistan's Senate approved a controversial bill to help rape victims, despite vehement protests by hard-line Muslim lawmakers who claim the legislation violates Islamic law.

The bill is now set to go before President Gen. Pervez Musharraf, who is expected to sign it.

The Pakistani leader has been a strong supporter of changing contentious sections of the 1979 Hudood Ordinance, or rape law, as a way of softening the country's hard-line Islamic image and appeasing moderates and human rights groups opposed to the statutes.

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 the late President Gen. Zia ul-Haq to make Pakistani laws more Islamic.

The government-controlled Senate passed the amendments Thursday in an evening voice vote, Information Minister Mohammed Ali Durrani said. 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 lets judges choose whether to try a rape case in a criminal court or an Islamic court. Under the Hudood Ordinance, rape victims could only raise a case in the Islamic court, which requires testimony from four witnesses to the crime.

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 (US$165, euro129) fine instead of death.

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, 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.