Pakistan’s top court has acquitted a Christian woman who was sentenced to death in 2010 on blasphemy charges.
The landmark ruling in the Supreme Court to free Asia Bibi could ignite mass protests or violence by hardline Islamists.
The charges against Ms Bibi date back to 2009 when she went to get water for her and fellow farm workers. Two Muslim women refused to drink from a container used by a Christian and a few days later a mob accused her of blasphemy.
Ms Bibi’s family and her lawyer say she never insulted the prophet but she was convicted and sentenced to death.
She had been held at an undisclosed location for security reasons and is now expected to leave the country.
Protests took place ahead of and after the ruling, a controversial move in a country where the mere rumour of blasphemy can ignite mob violence and lynchings. Combating alleged blasphemy has become a central rallying cry for hardline Islamists.
In 2011, Salman Taseer, the governor of Punjab province, was shot and killed by one of his guards for defending Ms Bibi and criticising the misuse of the blasphemy law.
The assassin, Mumtaz Qadri, has been celebrated as a martyr by hardliners since he was hanged for the killing, with millions visiting a shrine set up for him near Islamabad.
Ahead of the verdict, Khadim Hussain Rizvi, a hardline cleric who has brought tens of thousands of people into the streets for past rallies, called on his supporters to gather in all major cities to express their love for the prophet and to protest if Ms Bibi was released.
Authorities have stepped up security at churches around the country.
Shortly after the ruling, hundreds of Islamists blocked a key road linking the city of Rawalpindi with the capital, Islamabad.
Islamists in Pakistan’s largest city of Karachi and in the north-western city of Peshawar were also gathering for the protests, while similar rallies were held elsewhere.
Police urged demonstrators to disperse peacefully but there were several arrests in the eastern city of Multan.
Paramilitary troops were deployed in Islamabad to prevent protesters from reaching the Supreme Court, where security for the judges was beefed up.
In previous hearings Ms Bibi's lawyer, Saiful Malook, pointed to contradictions in evidence from witnesses. The two Muslim women who pressed charges denied they quarrelled with her, saying her outbursts against Islam were unprovoked.
Critics of the blasphemy law have said it is used to settle personal scores or to attack minority communities. Ms Bibi’s case was closely followed internationally amid concern for Pakistan’s religious minorities, who have frequently come under attack by extremists in recent years.
Ms Bibi’s husband Ashiq Masih hailed Wednesday’s verdict, saying: “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."