Oct. 12 (UPI) -- Longtime Turkish captive Andrew Brunson was released from house arrest Friday, allowing the pastor to return to the United States after two years in captivity.
Brunson has been in Turkish custody since October 2016 when he was arrested on charges that he spied on the government and aided in a military coup attempt. Diplomatic relations between Washington, D.C., and Ankara have strained during the drawn-out ordeal.
Sources in the White House familiar with the negotiations say the Trump administration struck a deal with Turkey that included easing sanctions on the country.
At a court hearing Friday, Brunson was first sentenced to more than three years in prison but the judge then lifted all judicial controls -- including a travel ban -- based on Brunson's good behavior and time already served.
President Donald Trump imposed sanctions on Turkey after Ankara refused to release Brunson in August.
On Friday, he celebrated the pastor's release on Twitter.
My thoughts and prayers are with Pastor Brunson, and we hope to have him safely back home soon!- Donald J. Trump (@realDonaldTrump) October 12, 2018
This followed an earlier tweet where Trump said, "Working very hard on Pastor Brunson."
Sources confirmed Trump was working on a deal with Ankara, though no details have been released.
"This administration has been actively engaged in seeking Pastor Brunson's release for months, along with NASA scientist Serkan Golge and the employees of the U.S. mission in Turkey," a senior administration official said. "A positive development in the cases of Pastor Brunson, Serkan Golge, and local employees of the U.S. mission in Turkey would do much to improve confidence and to restore the bilateral relationship."
Turkey is holding 20 Turkish-Americans and three Turks who work for the American consular mission to use as leverage for disputes with the United States. Turkey wants Islamist preacher Fethullah Gulen to be extradited from the United States. Gulen is accused of running the terrorist group behind the 2016 coup attempt.
Brunson has been under house arrest since July because of health problems. A security detail took him from the home to the courthouse in Aliaga for the trial on Friday.