The lawyer representing a Christian woman acquitted of blasphemy after eight years on death row has fled Pakistan in fear for his life.
Saif Mulook told news agency AFP he had to leave so he could continue to represent Asia Bibi, whose conviction was overturned by judges on Wednesday.
Officials have since agreed to bar Asia Bibi from leaving Pakistan in order to end violent protests over the ruling.
Campaigners blasted the deal as akin to signing her "death warrant".
Asia Bibi was convicted in 2010 of insulting the Prophet Muhammad during a row with neighbours, and many are calling for the reinstatement of the death penalty following her acquittal.
Mr Mulook told the BBC earlier this week she would need to move to a Western country for her own safety. A number of attempts have previously been made on her life.
Several countries have offered her asylum.
Pakistani Information Minister Fawad Chaudhry defended the government against allegations that a deal reached with an Islamist party was capitulating to extremists.
He said the government would "take all steps necessary" to ensure Asia Bibi's safety.
Mr Mulook, however, called the agreement "painful".
"They cannot even implement an order of the country's highest court," he told AFP before he boarded the plane to Europe.
Mr Mulook said he had decided to leave as it was "not possible" to continue living in Pakistan, adding: "I need to stay alive as I still have to fight the legal battle for Asia Bibi."
He told Pakistan's Express Tribune he would return to the country to defend his client - but needed the government to provide security.
The protests were led by the Tehreek-i-Labaik (TLP) party.
As party of its deal with the TLP, the government said it would not oppose petitions filed against the Supreme Court's verdict.
What else is in the deal?
All protesters arrested since Asia Bibi's acquittal will be released, and any violence towards them will be investigated.
The government will also start legal proceedings to put her on a list which would ban her from leaving Pakistan.
Protest in Faizabad coming to an end after agreement between clerics and govt pic.twitter.com/5DeQvagVKm— Secunder Kermani (@SecKermani) November 2, 2018
In return, the TLP is asking its supporters to stop the protests and disperse peacefully.
The authorities earlier said that Asia Bibi was scheduled for release later this week.
What was she accused of?
The trial stems from an argument Asia Bibi, whose full name is Asia Noreen, had with a group of women in June 2009.
They were harvesting fruit when a row broke out about a bucket of water. The women said that because she had used a cup, they could no longer touch it, as her faith had made it unclean.
Prosecutors alleged that in the row which followed, the women said Asia Bibi should convert to Islam and that she made offensive comments about the Prophet Muhammad in response.
She was later beaten up at her home, during which her accusers say she confessed to blasphemy. She was arrested after a police investigation.
In Wednesday's ruling, the Supreme Court said that the case was based on flimsy evidence and her confession was delivered in front of a crowd "threatening to kill her".
Why is this case so divisive?
Islam is Pakistan's national religion and underpins its legal system. Public support for the strict blasphemy laws is strong.
Hard-line politicians have often backed severe punishments, partly as a way of shoring up their support base.
But critics say the laws have often been used to get revenge after personal disputes, and that convictions are based on thin evidence.
The vast majority of those convicted are Muslims or members of the Ahmadi community, but since the 1990s, scores of Christians have been convicted. They make up just 1.6% of the population.
The Christian community has been targeted by numerous attacks in recent years, leaving many feeling vulnerable to a climate of intolerance.
Since 1990, at least 65 people have reportedly been killed in Pakistan over claims of blasphemy.