ISLAMABAD -- Pakistan's top court on Wednesday acquitted a Christian woman who was sentenced to death under the country's controversial blasphemy law, a landmark ruling that sparked protests by hard-line Islamists and raised fears of violence.

Chief Justice Mian Saqib Nisar announced the verdict to a packed courtroom and ordered the release of Asia Bibi, who has been on death row since 2010. The Catholic mother of five has been held at an undisclosed location for security reasons and is expected to leave the country for her safety.

The verdict could set up a showdown between authorities and religious extremists, who held protests in several cities and blocked the road between Islamabad and Rawalpindi. Two Pakistani officials have already been assassinated in connection with the case, and hard-liners had threatened to target judges in case of acquittal.

The charges against Bibi date back to a hot day in 2009 when she went to get water for her and her fellow farmworkers. Two Muslim women refused to drink from a container used by a Christian. A few days later, a mob accused her of insulting Islam's Prophet Muhammad.

The mere rumour of blasphemy can spark lynchings in Pakistan, a deeply conservative country where religious minorities have been repeatedly targeted by extremists. Instead, Bibi was arrested, tried and sentenced to death in a case that drew international attention to the blasphemy law.

Rights groups say the blasphemy law has been used to settle scores and to persecute religious minorities, and have pressed for stricter punishments for false accusations. Religious extremists have made defending the law a central rallying cry and have attacked those who question it.

Salman Taseer, the governor of Punjab province, was shot and killed by one of his guards in 2011 for defending Bibi and criticizing the misuse of the blasphemy law. The assassin, Mumtaz Qadri, has been celebrated as a martyr by hard-liners since he was hanged for the killing, with millions visiting a shrine set up for him near Islamabad. Pakistan's minister for minorities, Shahbaz Bhatti, was assassinated later that year after demanding justice for Bibi.

After Wednesday's verdict, thousands of supporters of the Tehreek-i-Labaik party, led by firebrand cleric Khadim Hussain Rizvi, took to the streets in protest, demanding Bibi's public execution. Rizvi has brought tens of thousands of supporters into the streets in the past, often forcing authorities to bow to his demands on religious matters.

Hundreds of Islamists blocked a key road linking the city of Rawalpindi with the capital, Islamabad, and protests were held in Karachi, Peshawar and other cities. In the eastern city of Multan, police arrested several demonstrators after clashes.

Police urged demonstrators to disperse peacefully, and stepped up security around churches. Paramilitary troops deployed in Islamabad to prevent protesters from reaching the Supreme Court, where security for the judges was being beefed up.

Bibi's family and her lawyer say she never insulted the prophet. In previous hearings her attorney, Saiful Malook, pointed to contradictions in testimony from witnesses. The two Muslim women who pressed charges against Bibi denied they quarreled with her, saying her outbursts against Islam were unprovoked.

Chaudhry Ghulam Mustafa, a lawyer for one of the plaintiffs, rejected the verdict, saying Bibi had confessed to making derogatory remarks against the prophet to seek pardon.

The three-judge panel upheld the blasphemy law itself, saying it was consistent with verses from Islam's holy book, the Qur'an. But they said prosecutors had failed to prove that Bibi violated the law. In addition to citing the Qur'an, the judges also referenced Shakespeare's King Lear, saying Bibi was "more sinned against than sinning."

The verdict suggested that officials could be open to demands from rights groups for stricter punishments for false accusations.

"If our religion of Islam comes down heavily upon commission of blasphemy, then Islam is also very tough against those who level false allegations of a crime," they wrote.

Bibi's husband hailed Wednesday's verdict.

"I am very happy. My children are very happy. We are grateful to God. We are grateful to the judges for giving us justice. We knew that she is innocent," said Ashiq Masih.

"My wife spent so many years in jail and we hope that we will soon be together in a peaceful place," he said.

The U.S. Commission on International Religious Freedom, a government body, praised the decision to overturn the sentence, saying the case "illustrates the extent to which blasphemy laws can be exploited to target minority communities." It urged authorities to protect Bibi upon her release.

Pakistan's Christian community numbers some 2.5 million. Along with Shiites, Ahmadis and other minorities, they have been targeted by religious extremists.

------

Associated Press writers Asim Tanveer in Multan and Riaz Khan in Peshawar contributed.