ISTANBUL (Reuters) - A Turkish court convicted a former opposition lawmaker on Friday to four years and two months in jail for aiding a terrorist organization, Anadolu news agency said.

Eren Erdem, who lost his seat in last year’s election that brought in sweeping new powers for President Tayyip Erdogan, has been jailed since June and accused of publishing illegal wiretaps while editor of an opposition newspaper in 2014.

A Turkish court ruled in January that Erdem be freed on bail but a higher court overturned the decision.

He denies charges of assisting followers of U.S.-based cleric Fethullah Gulen, who is accused of orchestrating a failed 2016 putsch. Gulen denies any link to the attempted coup.

He is the second politician from the secularist Republican People’s Party (CHP) to be convicted in a sweeping security crackdown since the attempted military coup that has sparked outrage from rights groups and some of Turkey’s Western allies.