In the eight weeks before John Patrick Bedell put on a white shirt and blazer, parked his 1998 Toyota at the Pentagon City mall and emerged ready to open fire at officers standing outside the Pentagon, he had crisscrossed the country in a frenetic and sometimes doped-up state that had his parents so worried they alerted police that he might be armed.

On Thursday evening outside the Pentagon Metro station, Bedell, a troubled 36-year-old Californian who loved marijuana, computers and conspiracy theories, shot two Pentagon officers. Three officers fired at Bedell, and he was hit in the arm and head; he later died.

Police records and interviews with those who knew him describe a man who had been slipping into increasingly disturbed thinking for years but whose behavior became uncharacteristically erratic only in recent months.

"We may never know why he made this terrible decision," Bedell's family said in a statement Friday. "One thing is clear though -- his actions were caused by an illness and not a defective character."

In early January, a Texas Highway Patrol officer stopped Bedell near Texarkana, Tex., for speeding. Bedell's car was in "disarray," the officer noted, and the driver was lurching up and down and rocking on his knees, repeatedly hanging up on a series of cellphone calls that Bedell said were from his mother. Concerned about Bedell's mental state, the officer called his parents and learned that they had filed a missing persons report -- one that noted Bedell had been "detained for mental evaluation before."

Police records show that Bedell's mother, Kaye, who works as director of allied health at Gavilan College in Gilroy, Calif., told the Texas police that her son was all right, and he was sent on his way. Bedell, according to police, said he was heading to the East Coast but instead drove home.

He wouldn't stay long. On Feb. 1, Bedell hit the road again and was stopped by an officer in Reno. He had drifted across traffic lanes and stopped yards short of a stoplight, according to a police report. Bedell was charged with possession of marijuana after a pink pot pipe was found in his pants pocket.

Bedell made bond. On Thursday, he showed up at the Pentagon, parked in the Pentagon City Fashion Centre garage and made his way to the Pentagon's main entrance. There, in an exchange that lasted less than a minute, two officers, Jeffrey Amos and Marvin Carraway, were superficially wounded, one in the shoulder and one in the thigh. They and a third officer returned fire, mortally wounding Bedell.

Buzz Hawley, 40, a lawyer from Fairfax County, was waiting for a bus outside the Pentagon when shooting started about 30 yards away. "We just heard this flurry of pops -- about 10 to 15," he said Friday. "Everybody just sort of stood there. We didn't know what to make of it. You'd think we'd have headed for cover. A woman next to me said, 'Gosh, we're sitting ducks standing here.' It went on for a good seven seconds. Rapid fire. Boom, boom, boom, boom, boom. It just kept going."

Federal law enforcement sources said Bedell used a Sturm 9mm and a Taurus 9mm. Officials with the Bureau of Alcohol, Tobacco, Firearms and Explosives said that it could take several days to trace the source of the guns he used and that they are working with authorities in California.

"Hopefully, we can find out how these guns came into his possession. At this point, we still can't say," said Special Agent Mike Campbell, spokesman for the ATF Washington Field Office. "Unfortunately, not every trace is successful."

Richard S. Keevill, chief of the Pentagon Force Protection Agency, said police and the FBI are examining surveillance video that shows Bedell approaching the Pentagon and have tracked his weeks-long road trip from California to the Washington area.

"There are no indications at this point that there are any international or domestic connections to this incident at all," Keevill said. "At this time, it appears to be a single individual that had issues."

Bedell left an electronic trail thick with written, video and audio manifestoes. In an audio address posted on the Internet, he suggested that after the 1963 assassination of President John F. Kennedy the United States had been infiltrated by a cabal of gangsters he called the "coup regime." Bedell believed that the group has continued manipulating the country "up to the present day" and was probably responsible for the Sept. 11 terrorist attacks and the Iraq war.

In recent years, in conversations with friends and in Internet postings, Bedell seemed obsessed by what he saw as attacks on personal liberty. He was especially irked by criminal penalties for marijuana use, said Reb Monaco, a family friend who knew Bedell for most of his life. But Bedell had never expressed hostility toward the military, Monaco said.

Monaco said he and his wife were with Bedell's parents as they learned how their son's cross-country trip had ended.

Police and the FBI said that at the Pentagon, Bedell had a full beard and wore slacks and a blazer -- a sharp contrast to his appearances on the Internet, in which he appears cleanshaven, speaking softly about his invention of a stock market-like information exchange.

Known to friends as Patrick, Bedell "had gone off the deep end right before he left, his parents told us," Monaco said after spending the night and morning at the family home at the Ridgemark Golf and Country Club in Hollister, Calif.

Bedell had been arrested on drug charges and spoke "often about drug use and why it was helpful to him," said Monaco, who added that the arrests stretched back several years and were a source of "great concern to his parents."

A Web page that included a speech by Bedell on YouTube also cited a 2006 Orange County, Calif., case in which Bedell was charged with cultivating marijuana, as well as a copy of a 2006 prescription for medical use of marijuana issued to John Patrick Bedell for "chronic insomnia."

"He was not a person who should have been issued a medical clearance to use marijuana, but he was," Monaco said.

Bedell lived with his parents, Kaye and John Bedell Sr., a financial planner. In their missing persons report about their son, they said they thought he was working in San Jose but did not know where.

Friends reached yesterday said they did not recognize the portrait that was emerging of Bedell. They remembered him as a teenager who wore Birkenstocks to high school, a brilliant young man who attended liberal colleges, a regular at the farmer's market.

"I remember him being a sweet-natured, funny peacenik," said Paul Hamilton, who went to San Benito High School with Bedell and knew his family for 25 years. "I never knew anything about this side of him. It's weird to turn on the TV and see someone you know and see him called a terrorist."

In an online profile, Bedell wrote that he attended the University of California at Santa Cruz and San Jose State University. Officials at Santa Cruz confirmed that a man by that name attended the school from 1992 to 1998 and received a bachelor's degree in physics. At San Jose State, where Bedell took graduate and undergraduate courses, chemical engineering professor David Parent described him as one of his most memorable students and then broke down in tears.