A Turkish court has ruled to release American evangelical pastor Andrew Brunson from house arrest despite sentencing him to three years in prison on terrorism-related charges.
The court in the western city of Aliaga said Brunson, who was at the center of a diplomatic dispute between Ankara and Washington, will not spend any more time in custody because of time already served.
The court's decision, reached during the fourth hearing in the case, meant that Brunson could leave Turkey and return to the United States.
Hours later, Brunson was transported to Izmir's airport and flown out of Turkey, where he had lived for over two decades.
The 50-year-old Brunson, who was detained in October 2016, had faced up to 35 years in prison if convicted on the charges of terrorism and espionage.
He was charged with links to Kurdish militants and supporters of U.S.-based cleric Fethullah Gulen, blamed by Ankara for a failed coup attempt in 2016.
Brunson rejects the charges.
U.S. President Donald Trump said his "thoughts and prayers" were with Brunson. "We hope to have him safely back home soon!" Trump tweeted.
An earlier tweet indicated that his administration had worked hard on Brunson's case, but did not elaborate.
Washington says he is being unjustly held as part of a wide-scale government crackdown that followed the failed coup.
Washington in August imposed sanctions on two Turkish officials and doubled tariffs on Turkish steel and aluminum imports.