Brunson, who was first detained in October 2016, faces up to 35 years in jail if found guilty (AFP)
A Turkish court has ruled that a US pastor at the centre of a diplomatic row between Ankara and the US will be removed from jail and placed under house arrest.
Andrew Brunson has been imprisoned for almost two years on terrorism-related charges in a case that has raised tensions with Washington.
Footage from broadcaster DHA showed Andrew Brunson, who ran a protestant church in the Aegean city of Izmir, being escorted by officials from his prison on Wednesday. He departed from the jail shortly after, in a convoy of cars.
Ismail Cem Halavurt, Brunson's lawyer, said his client will have to wear an electronic ankle bracelet and is banned from leaving the country.
Following Wednesday's announcement, US Secretary of State Mike Pompeo tweeted: "We welcome long overdue news that Pastor Brunson has been moved from prison to house arrest in #Turkey, but it is not enough.
"We have seen no credible evidence against Mr Brunson, and call on Turkish authorities to resolve his case immediately in a transparent and fair manner."
On 18 July, the same court had rejected a call by Brunson's defence for his release, with his next hearing set for 12 October.
The state-owned Anadolu news agency said the court decided, after re-evaluating the case, that he could leave prison on health grounds and because he would be under effective judicial control.
It said Brunson's defence had been completed and evidence for the case was almost all collected.
Following the earlier ruling last week, US President Donald Trump had tweeted: "A total disgrace that Turkey will not release a respected US Pastor, Andrew Brunson, from prison. He has been held hostage far too long.
"@RT_Erdogan should do something to free this wonderful Christian husband and father. He has done nothing wrong, and his family needs him!"
Brunson, a Christian pastor from North Carolina who has lived in Turkey for more than two decades, was indicted on charges of helping the group that Ankara blames for a failed coup in 2016, as well as supporting the outlawed Kurdistan Workers Party (PKK) group.
Brunson, who served a small Protestant congregation at the Izmir Resurrection Church in Turkey's third-largest city, denies the charges.
The pastor, who was first detained in October 2016, faces up to 35 years in jail if found guilty.
"It is really hard to stay in jail and be separated from my wife and children," Brunson had told the court in Turkish at the hearing earlier this month in the town of Aliaga, north of Izmir.
Speaking to the Christian Broadcasting Network's last week, US Secretary of State Mike Pompeo, had said: "Pastor Brunson's case is very much a focus of the team that I lead here at the State Department, and we're optimistic that in the days and weeks ahead we'll get a good outcome for Pastor Brunson, his family, and frankly for many of those that are held in places around the world."
The US and Turkey have been formal military allies since Turkey joined the NATO in 1952, but relations have been fraught in recent years on issues ranging from Turkey's involvement in Syria's civil war to Washington's refusal to extradite Fethullah Gulen, a US-based cleric Ankara says was behind the failed 2016 coup.
Turkey is continuing to press for the extradition of Gulen, who denies the charges and lives in a secluded compound in Pennsylvania.
In September, Erdogan suggested that Turkey could free Brunson if Washington handed over Gulen in a swap deal.
"Give him (Gulen) to us, and we will try (Brunson) and give him back," Erdogan said at the time.