DEARBORN (WWJ/AP) – A California man accused of making a terrorist threat against a Dearborn mosque has agreed to a plea deal with the Feds.

Authorities say 64-year-old Roger Stockham pleaded guilty but mentally ill and has been placed in the custody of federal authorities.

READ MORE: Michigan Matters: The Mobility Revolution Envelops the Region

Stockham was arrested in January outside the Islamic Center of America on Ford Road wearing a ski mask. The arrest came after Stockham mentioned an explosion with someone he met in a bar.

Prosecutors allege Stockham, who has been in and out of jail and psychiatric hospitals for decades, was planning to attack the mosque, but was caught before he could do it.

When Stockham was arrested, police found powerful illegal fireworks in his car. Stockham, a Vietnam War veteran and Muslim convert, said he planned to write graffiti on the mosque over his concern about claims that a U.S. helicopter pilot shot civilians in Iraq, according defense attorney Matthew Evans.

“There was no doubt he wanted to get some attention, but he didn’t even have any matches with him when they arrested him, or a lighter,” Evans said.

READ MORE: Michigan Humane Rescues Kitten From Drain Pipe In Detroit

Why was Stockham wearing a ski mask?

“It was cold. He’s from California so he’s not used to this weather. So, you know, this happened in January, so he had the ski mask. When they actually pulled him over, he had taken it off,” Evans said.

Records show federal marshals took custody of Stockham after a Wayne County judge placed him on probation last week. He’ll next go to Vermont.

The Michigan case may trigger a probation violation in an old criminal case in federal court. In 2002, he was accused of making threats against President George W. Bush and veterans officials in Vermont.

MORE NEWS: Back Again: DTE Energy Music Theatre Returns To Original Name

TM and © Copyright 2011 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2011 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed. The Associated Press contributed to this report.