More details have emerged about the troubled life of Aaron Alexis, the man who allegedly shot 12 people to death Monday morning at the Washington Navy Yard. In addition to his discharge from the Navy and multiple arrests, Alexis reportedly had a long history of mental illness.

Sources told NBC News that Alexis had been treated multiple times for psychological issues like anger, sleep deprivation, and paranoia, and the Associated Press is reporting that Alexis was treated by the Veterans Administration for “hearing voices,” among other problems.

The mental illness issues, coupled with his “general discharge” from the Navy in 2011 (reportedly for a “pattern of misconduct”) [UPDATE: The Washington Post is now reporting that Alexis's discharge was "honorable"] and arrests for violent behavior involving firearms probably should have prevented him from gaining clearance to the secure-areas like the Navy Yard, but they weren't; Alexis, who had just moved to Washington D.C. this month to work as an hourly computer contractor for a company called The Experts, had “legitimate access” to the naval headquarters, according to an FBI spokeswoman.

"He did have a secret clearance. And he did have a CAC (common access card)," Thomas Hoshko, CEO of The Experts Inc, told Reuters, adding that Alexis worked from the company from September 2012 to January 2013. "We had just recently re-hired him. Another background investigation was re-run and cleared through the defense security service in July 2013.”

Hoshko also said he believed Alexis had high-level security clearance going back to 2007.

Alexis reportedly used a shotgun he purchased legally last week in Virginia in the shooting, smuggling the weapon in his car past security. He then picked up two other weapons — a pistol and an AR-15 style assault rifle [UPDATE: he reportedly used two handguns, not an AR-15] — during his shooting spree, one from a police officer and the other from a secure location in the building, according to authorities who spoke with NBC News.

One possible reason Alexis' arrest history didn't raise any red flags is that the paperwork for his 2004 arrest in Seattle, for shooting out a co-workers tires with a Glock pistol, was lost.

“That report never got to the Seattle city attorney’s office,” Kimberly Mills, a spokeswoman for the city attorney, told the Washington Post. “Consequently, we never filed charges.”

[Images via AP]