A Turkish court on Thursday ordered release of a former opposition party lawmaker who was arrested on terrorism charges last year.

In its ruling, the Istanbul Court of Justice sentenced Eren Erdem, a former Republican People’s Party (CHP) lawmaker, to four years and two months on charges of ”willingly aiding an armed terror group although he is not a member” but released him ”considering the time he served in prison and his likely appeal process”.

The court also imposed a travel ban on Erdem.

Read more: Turkish court orders release of ex-opposition MP