Two Turkish generals serving in Afghanistan and a former Istanbul governor have been detained as part of a crackdown in the wake of Turkey's July 15 failed coup.

The two generals were caught in Dubai, while the governor, Husayin Avni Mutlu, who served from 2010-2014, was detained in Istanbul, an official at the office of President Recep Tayyip Erdogan said on condition of anonymity in line with regulations on speaking to the press.

The detentions were the latest in a purge in the wake of the attempted coup which killed about 290 people. More than 13,000 people in the military, judiciary and other institutions have been detained while tens of thousands have been suspended from their jobs in sectors including education, health care, municipalities and the Turkish national airline.