Before Turkey released American pastor Andrew Brunson, he was at the center of tensions between the two NATO allies.
To Turkey, Brunson was a spy who attempted to overthrow the government during a 2016 coup attempt. But to US officials, he was a Christian family man who was wrongfully detained.
Continents and regions
Coups and attempted coups
Crime, law enforcement and corrections
Embargoes and sanctions
International relations and national security
Law and legal system
Middle East and North Africa
Political Figures - Intl
Political Figures - US
Recep Tayyip Erdogan
Unrest, conflicts and war
Government and public administration
Government bodies and offices
US federal government
The debate strained relations between the two nations and raised the possibility of significant sanctions and further threats. So who exactly is Brunson, and how did the pastor become a key figure in US-Turkey relations?
Brunson is from North Carolina
Brunson, 50, is a native of North Carolina and an evangelical Presbyterian pastor who worked at a church in Izmir on Turkey's Aegean coast.
He lived in Turkey for more than 23 years with his wife and three children, according to the American Center for Law and Justice, an organization that advocated for his release.
But in October 2016, months after a failed coup attempt in Turkey, he was arrested and accused of plotting to overthrow the government. The center said Brunson was arrested primarily because of his Christian faith, and US officials also said the accusations had no merit.
Brunson was formally indicted in March on charges of espionage and having links to terrorist organizations. The charges included supporting the outlawed Kurdistan Workers' Party as well as the Gulen Movement, which Turkey accuses of orchestrating the coup attempt.
A Turkish court on Friday sentenced Brunson to three years and one month in prison but chose to release him based on his time already served as well as his manner during the proceedings, his attorney said. Prosecutors were seeking a 10-year prison term.
After his release, Brunson quickly left his home in Izmir and went to the airport. He landed at Ramstein Air Base in Germany before he was to head on to Washington, a senior US administration official said Friday night.
Brunson arrived around midday Saturday at Andrews Air Force Base outside Washington. He later met with President Donald Trump in the Oval Office.
The White House repeatedly pushed for his release
In July, Turkey released Brunson to house arrest and ordered him to wear an electronic monitoring device. State-run news agency Anadolu reported the Turkish court decision was due to his health problems.
Even before the pastor's move to house arrest, the White House repeatedly pushed for his release in conversations with Turkish officials.
President Donald Trump tweeted about Brunson several times. The first time was in April when the US President asserted that Brunson was being "persecuted in Turkey for no reason."
"They call him a spy, but I am more a spy than he is. Hopefully he will be allowed to come home to his beautiful family where he belongs!"
On July 18, Trump said it was a "total disgrace" that Turkey wouldn't release Brunson in a tweet that tagged Turkish President Recep Tayyip Erdogan's account.
"A total disgrace that Turkey will not release a respected U.S. Pastor, Andrew Brunson, from prison. He has been held hostage far too long," Trump said.
At the time, Trump tweeted that the United States would impose "large sanctions" on Turkey for its detainment of Brunson, "a great Christian family man and wonderful human being. He is suffering greatly. This innocent man of faith should be released immediately!"
Turkish officials sharply criticized the US threats of sanctions.
"No one dictates Turkey. We will never tolerate threats from anybody. Rule of law is for everyone; no exception," Turkish Foreign Minister Mevlut Cavusoglu said via Twitter in July.
Hami Aksoy, a spokesman for Turkey's Ministry of Foreign Affairs, said such threats were "unacceptable" and disregarded the US-Turkey alliance.
Turkey demanded a prisoner swap
At one point, Erdogan raised the possibility of a prisoner swap for Brunson.
In May, the Turkish leader questioned why the United States was pushing for Brunson's release, even as it refused to extradite Fethullah Gulen. Gulen is an exiled cleric living in Pennsylvania whom the Turkish government accuses of being behind the failed coup attempt.
"(Gulen's) being harbored there. And he's not a convict. He's not even being detained," Erdogan said. "And we demand his extradition, and he's not being extradited to us. But there is a Pastor Brunson here, who is being currently prosecuted -- and he's allegedly associated with terrorist organizations. And you're asking for him?"
Last fall, Erdogan raised Gulen's extradition in a televised speech that suggested the cleric and Brunson could be swapped.
"'Give us the pastor back,' they say. Well, you have a pastor as well. Give that one back to us, then we will give (Brunson) back to you," Erdogan said.
But by Friday night, Trump applauded Brunson's release while addressing a rally in Lebanon, Ohio.
"Earlier today we secured the release of Pastor Andrew Brunson," Trump said. The pastor, he said, is "free from jail" and on his way to Germany, where he was to undergo a "brief check."