Turkish President Tayyip Erdogan speaks to media after his meeting with Britain's Prime Minister Theresa May at the Presidential Palace in Ankara, Turkey, January 28, 2017. REUTERS/Umit Bektas

ANKARA (Reuters) - Turkish authorities ordered the detention of 177 police officers, the state-run Anadolu agency said on Thursday, widening a crackdown against people accused of links to a failed coup in July.

The suspects, from 25 provinces, were being sought on suspicion of using ByLock, an encrypted smartphone messaging app, the agency said, citing the Ankara prosecutor’s office.

The government has accused the network of cleric Fethullah Gulen of orchestrating the coup, and says it made use of ByLock in the attempt.

Gulen, who has lived in self-imposed exile in Pennsylvania since 1999, has denied the charge and condemned the coup.

In the post-coup crackdown, Turkey has jailed some 40,000 people pending trial and has suspended or dismissed more than 125,000 from the military, judiciary and public services.

Among the suspects sought on Thursday were police officers who had previously been dismissed over alleged links to Gulen’s network, Anadolu said. It said some of suspects had already been detained and would be brought to Ankara for questioning.

President Tayyip Erdogan declared emergency rule after the failed coup, enabling the government to bypass parliament in enacting new laws and limit or suspend rights and freedoms when deemed necessary.

Rights groups and some of Turkey’s Western allies fear Erdogan is using the coup as a pretext to stifle dissent, but he says the moves are necessary to protect democracy and root out Gulen supporters.

Turkey, a NATO member, has been hit by a series of bombings and shootings in the past year in addition to the coup, in which soldiers commandeered tanks and fighter jets in a bid to seize power, killing at least 240 people.