A Wixom man police say is the Interstate 96 corridor shooter who terrorized motorists in October 2012 testified Monday that he was prompted to randomly shoot at cars after receiving “coded messages” during Detroit Tiger baseball games.

Attorneys will present closing arguments on Tuesday in Livingston Circuit Court in the case of Raulie Wayne Casteel, 44, charged with terrorism, assault and firearms offenses in 21 shooting incidents across Livingston, Ingham and Shiawassee counties in October 2012. No one was injured in any of the incidents where motorists reported their vehicles were struck by gunfire.

The shootings put the region on guard for weeks before a multi-agency task force of federal, state and local law enforcement announced an arrest.

During his testimony Casteeladmitted several years of frustration over his inability to find a job and also to being “paranoid” of what he thought was a government conspiracy directed at him and his family since 2009. He said the shootings also came after concern he was being monitored for unknown reasons.

“It was to get rid of the demon, so to speak, “ Casteel calmly testified, referring to the shootings.

The married, unemployed geologist, who testified for more than two hours said he returned to Michigan in 2012 after he lost his job in Kentucky in 2009. He said his former employer and the U.S. government were working together to blackball him from other employment.

Additionally, he testified “advance technologies” — possibly satellite signals — were being used to injure his family and caused his wife to have two miscarriages, his three-year-old daughter to experience skin rashes and lesions, and killed his family’s cat.

“It sounds crazy. ... I was paranoid,” testified Casteel, who said since his November 2012 arrest and being placed on medication in jail he has not experienced any of the past feelings.

Under cross-examination by assistant state attorney general Gregory Townsend, Casteel insisted that he carried a handgun to protect his family and himself and while he knows guns can injure people, it was never his intent to kill anyone or to terrorize anyone but was “instantaneous.”

Casteel said one of the shootings occurred while he was listening to a Tigers baseball game on his car radio and suffered anxiety at seeing a “long line of cars” driving in his direction.

He said he recalled listening to one pre-game broadcast discussing baseball hitters “aiming at shadows” or “shooting at shadows.”

“To me it meant shooting at cars,” he said.

Casteel is charged with assault with intent to murder in one shooting involving a restaurant owner’s vehicle. Investigators recovered two firearms from Casteel after he was taken into custody.

Investigators testified bullet fragments found in the vehicles of seven victims match that of a 9mm Ruger handgun found in Casteel’s home and a shell casing matching the Ruger was also found in the windshield wiper track of Casteel’s dark gray 2009 Chevrolet Malibu.

Casteel has already pleaded no contest but mentally ill to similar shootings at motorists in Oakland County where he is to be sentenced Thursday for multiple counts of assault with intent to do great bodily harm less than murder.