ANKARA (Reuters) - Turkey detained the main opposition leader’s lawyer on Friday for alleged links to the network accused of carrying out last year’s failed coup, in a widening government crackdown.

Lawyer Celal Celik was a former top court judge who resigned from his post in September 2011 in protest of the rising influence of U.S.-based Muslim cleric Fethullah Gulen’s network in the judiciary.

However, Celik had now been detained at his home in the capital Ankara as part of operations targeting the network.

Turkey accuses cleric Gulen of orchestrating the abortive putsch in July 2016. Gulen, who has lived in self-imposed exile in the United States since 1999, denies involvement.

“What happened today is a disgrace in the name of democracy. The detention decision concerning my lawyer is an eclipse of the mind,” main opposition Republican People’s Party (CHP) chairman Kemal Kilicdaroglu was cited as saying by broadcaster CNN Turk.

President Tayyip Erdogan and his ruling AK Party have recently adapted a harsher rhetoric against Kilicdaroglu, repeatedly accusing him and the CHP of being linked to Gulen’s network and acting together with what it calls the “terrorist organization”.

Using Erdogan’s acronym for the Gulen network, Kilicdaroglu said the government was “supporting the FETO under the banner of a fight against the FETO.”

Prime Minister Binali Yildirim told reporters after Friday prayers that Celik’s detention was a legal process, and that he hoped “a correct decision” would come from the investigations.

CHP Spokesman Bulent Tezcan said the detention was a plot against the party.

“Celik had resigned from his judgeship at the court of appeals to battle the FETO when it was at its most powerful. If Calik’s home can be raided, then let it be known that every single person faces this threat,” Tezcan said.

More than 50,000 people have been jailed pending trial for alleged ties to Gulen’s movement and some 150,000 people, including journalists and opposition figures, have been sacked or suspended from jobs in the public and private sectors for the same reason.

Rights groups and Turkey’s Western allies have expressed concern about the crackdown and suspect the government has used the coup as a pretext to quash dissent.

The government says the purges are necessary due to the gravity of the threats it has faced since the failed putsch, in which more than 240 people were killed.