ISTANBUL - Turkish authorities on Saturday arrested three former top diplomats over the failed July 15 coup, including a senior official who brokered a meeting between the then premier and the US-based preacher blamed for the plot.

A court in Ankara remanded in custody Gurcan Balik, Ali Findik and Tuncay Babali ahead of a trial over their alleged links to gulen , the state-run Anadolu news agency said. All three were sent to the city's Sincan jail.

Balik was chief foreign policy advisor to former president Abdullah Gul, who served as president from 2007 to 2014 before handing over to Recep Tayyip Erdogan.

He had also worked as an advisor to former prime minister Ahmet Davutoglu during his long stint as foreign minister.

In that role, Balik in 2013 set up a hugely controversial meeting between Davutoglu and US-based cleric Fethullah gulen while the then foreign minister was attending the UN General Assembly in New York, Anadolu said.

Davutoglu in May 2015 confirmed he had secretly visited gulen for talks at his Pennsylvania compound aimed at persuading him to return to turkey to ease tensions in the bureaucracy.

He has insisted both Gul and Erdogan, then prime minister, were aware of the visit. Gul however said he only found out afterwards.

Davutoglu insisted there was nothing underhand or illegal about the meeting. "I have never obscured any issue in my life or held a meeting off the state record," he said in 2015.

Balik was also briefly Turkish ambassador to UNESCO.

Babali and Findik were turkey 's ambassadors to Canada and Costa Rica respectively but neither had been on active mission since early 2014.

Balik was first detained on August 19 and the two other ambassadors on August 18.

turkey has embarked on an all-out purge of state institutions in the wake of the coup to rid the country of what Erdogan calls the "virus" of gulen 's influence.

Balik's arrest is significant as it represents one of the first times a figure linked to the political leadership in the ruling Justice and Development Party (AKP) has been implicated in the coup.

There has never been any suggestion of wrongdoing on the part of Gul and Davutoglu and both condemned the coup in the strongest possible terms.

gulen , whose influence in Turkish politics goes back to the 1960s, was an ally of the AKP when it first came to power in 2002.

This helped the preacher to increase his sway in turkey through allies in state institutions and an immense private education network, even from the US exile where he has lived since 1999.

After the coup, top AKP officials have admitted they were mistaken in teaming up with gulen , an alliance that terminally broke when a corruption scandal broke late in 2013.

Erdogan has even asked forgiveness for failing to see the "true face" of gulen .

According to Anadolu, the foreign ministry fired 88 people in the wake of the coup.

Almost 70,000 civil servants have been dismissed in total across all institutions, over half of them in the education sector.