On Friday, the case of detained US pastor Andrew Brunson came before the high criminal court in the Turkish city of Izmir. He has been detained since 2016 when he was arrested and charged with connections to terrorist groups. He was sentenced to three years in prison on Friday after witnesses recanted. Due to time already served and part of the sentence suspended, he will go free.In July, US President Donald Trump described the pastor as a “great Christian, family man,” and threatened sanctions over his continued detention. The US began imposing sanctions in August and has continued through this month, increasing pressure on Ankara. Although Turkey claims the case cannot be resolved diplomatically, as it must make its way through the courts, there have been hints at discussions in the background. In addition there is a growing feeling in Turkey that the case has threatened key US-Turkish relations. Turkey has been meeting with Russia and Iran more regularly to discuss Syria and Turkey and Russia signed an agreement about Idlib last month, staving off a Syrian regime offensive that could have sent more refugees into Turkey. But Ankara wants to repair its economy and relations with the US.When Trump was elected Turkey expected relations to improve. Turkey was angry that the US under the Obama administration when the US partnered with Kurdish forces in Syria to fight ISIS as part of the US-led anti-ISIS Coalition. The Kurds were the most effective anti-ISIS fighters but they were members of the People’s Protection Units (YPG) which Turkey views as part of the Kurdistan Workers Party (PKK). A ceasefire between Ankara and the PKK broke down in 2015 and there was a harsh conflict unfolding in eastern Turkey. After the coup in 2016 Turkey began detaining and jailing not only PKK leaders but members of the HDP party, a mostly Kurdish leftist party that Ankara also accuses of being pro-PKK. In this context Ankara was outraged as the US and its partners in Syria rolled into Manbij in northern Syria, defeating ISIS, but bringing the YPG more power. Trump continued the alliance with the Kurds, now fighting under the banner of the Syrian Democratic Forces, and the US says it wants to stay in eastern Syria until Iran leaves the rest of Syria.Pastor Brunson became a pawn in this conflict. He was also a pawn because Turkey wants the US to deport a jailed cleric Fethullah Gulen, who Turkey accuses of being behind the 2016 coup attempt. But the case has become a headache and on Thursday rumors circulated that Brunson would be freed, perhaps found guilty and given “time served” and deported. Ilnur Cevik, writing at Daily Sabah argued that “the issue was blown out of proportion in the last few months.” In the afternoon on Friday three witnesses retracted accusations against Brunson in court which paved the way for the pastor’s release.” Regip Soylu, watching the case for Daily Sabah tweeted at 4:30 that the pastor was sentenced to time served and a suspended sentence of three years. He is expected to go free. This is a major victory for the US and Turkey, both of which will save face. It will also likely improve relations and may be linked to the pressure Turkey is putting on Riyadh to answer for the disappearance of Saudi journalist Jamal Khashoggi on October 2. Turkey is also focusing on a military operation in Manbij and will want to pressure the US forces stationed there. With the Brunson case out of the way a new phase of Turkish-US relations will begin. However, given the controversies in Saudi Arabia, Turkey’s economy, and issues in northern Syria, there are many complexities ahead.