BURLINGTON — A 65-year-old man with a long history of threatening public officials and plotting to blow up the nation’s largest mosque in Dearborn, Mich., could soon be living in a community facility in Vermont for people with serious mental illnesses.

A federal judge ruled Monday that Roger Stockham could be released safely into the community as long as he took his daily medications.

U.S. District Court Judge William Sessions III told Stockham that if he failed to take his medications he would be back in court immediately.

Stockham was arrested Jan. 24, 2011, outside the Islamic Center of America in Dearborn. Police found fireworks in his vehicle.

Stockham was on probation for a Vermont case when he was arrested in Michigan.