ISTANBUL (Reuters) - Turkish prosecutors have ordered the arrest of 124 people in an operation targeting alleged supporters in the army of the U.S.-based Islamic cleric accused of orchestrating an attempted coup in Turkey two years ago, state media said on Tuesday.

The arrest order, which state-run Anadolu news agency said was part of an investigation focused on the central Turkish city of Konya and spread across 31 provinces, came as Turkey prepares for presidential and parliamentary elections on Sunday.

The suspects were accused of being followers of the preacher Fethullah Gulen, whom Ankara says was behind the failed putsch on July 15, 2016. They were said to have operated as religious guides for high-ranking military personnel.

Turkey has detained 160,000 people and dismissed nearly the same number of civil servants since the coup attempt, the U.N. human rights office said in March. Of that number, more than 50,000 have been formally charged and kept in jail during their trials.

Critics of President Tayyip Erdogan accuse him of using the failed putsch as a pretext to quash dissent. Turkey says the measures are necessary to combat threats to national security.