A suburban terrorism suspect arrested more than five years ago for trying to set off a bomb downtown has been found competent to stand trial, court records show.

U.S. District Judge Sharon Johnson Coleman found Adel Daoud, 24, not mentally fit in August 2016 and he was sent to a federal treatment facility in Springfield, Missouri.

However, following a hearing Monday, Coleman found that Daoud’s competency had been restored. It is not yet clear when he might go to trial. Coleman has repeatedly complained that Daoud has spent most of his adult life behind bars — and much of it in solitary confinement — while his trial has been repeatedly delayed.

A pair of experts agreed this week that Daoud’s competency is “dependent on the continuation of his medication,” records show.

Daoud, of Hillside, allegedly placed what he thought was a car bomb near a downtown Chicago bar in September 2012 and said a prayer before pushing the detonator. The inert device had been given to him by an undercover federal agent.

While in jail, Daoud allegedly tried to plot the murder of the undercover agent who set him up. He also allegedly assaulted a fellow inmate over a cartoon of the Prophet Muhammad.

A two-day competency hearing in 2016 revealed predictions by Daoud that the government would execute him by beheading, and that he blamed a cellmate’s suicide on Coleman. Daoud had also rambled on repeatedly in court about reptilian overlords, the Illuminati and Free Masons.