WASHINGTON -- The former Irvine resident who opened fire outside the Pentagon had a history of mental illness and had become so erratic that his parents reached out to local authorities weeks ago with a warning that he was unstable and might have a gun, authorities said Friday.

It's still unclear why John Patrick Bedell opened fire Thursday at the Pentagon entrance, wounding two police officers before he was fatally shot.

Bedell was diagnosed as bipolar, or manic depressive, and had been in and out of treatment programs for years.

Court records show he was arrested in 2006 at an apartment in Irvine after neighbors spotted marijuana plants growing in plain sight on his balcony.

He went limp when officers tried to arrest him and was charged with resisting arrest in addition to a drug charge, records show.

He was still on probation for those charges when, in 2007, he was arrested in central California for picking a fight.

He blamed his behavior on a bipolar disorder, and said he had been hospitalized for it, records show.

His court file also includes a letter from a psychiatrist at San Benito County Behavioral Health Department, who wrote that Bedell had been a patient there since 2004.

Psychiatrist, J. Michael Nelson, said Bedell tried to self-medicate with marijuana, inadvertently making his symptoms more pronounced.

"Without the stabilizing medication, the symptoms of his disinhibition, agitation and fearfullness complicated the lack of treatment," Nelson said.

His parents reported him missing Jan. 4, a day after a Texas Highway Patrol officer stopped him for speeding in Amarillo, according to the missing person's report.

Bedell told the highway patrolman he was heading for the East Coast, and the officer used Bedell's phone to call his mother, Kaye Bedell, because he seemed disheveled and out of sorts.

Monaco said Kaye Bedell asked the officer to take him to a mental health facility, but that the son refused.

The patrolman let Bedell go with a warning.

The next day, Kaye told deputies in California that her son had no reason to travel to the East Coast because he had no friends or family there and she and her husband were worried about his mental state, San Benito County Sheriff Curtis Hill said.

Hill also said Bedell's parents found an e-mail from their son that indicated he had bought a gun. They asked Hill to help them find Bedell and get him assistance.

The 36-year-old Bedell returned to his parent's home Jan. 18, telling them "not to ask any questions" about where he had been.

But he left after that, and his parents didn't know where he went.

Little is known about his trip east, but authorities know he spent time in Reno, where Washoe County Sheriff Mike Haley said he was arrested on Feb. 1 with two ounces of marijuana in his car but no weapons.