ISTANBUL (Reuters) - Turkey ordered the detention of 331 soldiers on Friday in two operations targeting alleged supporters of the U.S.-based Islamic cleric who Ankara says orchestrated an attempted coup two years ago, state media and Istanbul police said.

The raids were among the biggest targeting alleged followers of preacher Fethullah Gulen in recent months. They came less than two weeks before the expected lifting of emergency rule, which was imposed following the attempted coup on July 15, 2016.

The probes were launched in dozens of provinces across Turkey against soldiers suspected to have been in contact with Gulen operatives, state-run Anadolu news agency said.

Istanbul police headquarters said in a statement it had so far detained 144 soldiers out of 256 sought in an operation based in Turkey’s largest city.

In the western coastal province of Izmir, arrest warrants were issued for 75 soldiers, of which 59 were currently serving, Anadolu said, adding that raids were still underway.

Most of those sought in the dawn raids by counter-terror police squads were serving officers including colonels, majors and captains, Istanbul police said. A retired general and 120 military students were also among the suspects.

Turkey has already detained 160,000 people and dismissed nearly the same number of civil servants since the abortive putsch, the U.N. human rights office said in March.

Of those detained, some 77,000 have been formally charged and kept in jail during their trials, the interior minister said in April.

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.