Hasan Hüseyin Özese, a former judge dismissed from his position after a failed coup in Turkey in 2016, was sentenced to 10 years in prison on Monday on conviction of membership in the Gülen movement, the state-run Anadolu news agency reported.

He was one of the judges hearing trials between 2008 and 2012 concerning the clandestine Ergenekon organization, which was once considered the “deep state” of Turkey.

Turkey accuses the Gülen movement, once a government ally, of orchestrating the failed putsch, although it denies any involvement.

Since the coup attempt, more than 4,000 judges and prosecutors have been dismissed from their jobs, with many of them prosecuted on charges of membership in the movement.

The court acquitted Özese of violating the Turkish constitution.

Following a rift between President Recep Tayyip Erdoğan’s government and the Gülen movement, the Ergenekon trials began to be considered a “scheme” against certain military members, bureaucrats and journalists by the latter.