Before traveling to Moscow last week, U.N. Secretary-General Antonio Guterres stopped over in Ankara to meet Recep Tayyip Erdogan and praise the Turkish leader's diplomatic efforts to end the war in Ukraine.

Less than two hours after the two shook hands, a big part of the goodwill that Ankara has engendered in the West through its unique role as mediator between warring parties was undone, undermining Turkey's chances of capitalizing on thawing ties.

The turning point came when an Istanbul court sentenced a philanthropist, Osman Kavala, to life in jail for his role in anti-government protests in 2013, in defiance of Western calls to free him in a closely watched case many see as politically motivated.