The gunman was identified as 34-year-old Aaron Alexis, a former Navy reservist and a current military contractor, the Washington FBI Field Office told CNN. His identity was confirmed by fingerprints and a picture ID card, the FBI said.

Authorities have not released a possible motive in the morning shooting at the headquarters for Naval Sea Systems Command that left 12 people -- and the gunman -- dead. But a friend said Alexis was locked in a dispute over money with the company that contracted him to work for the Navy.

Investigators also learned that Alexis had recently made contact with two Veterans Administration hospitals for apparent psychological issues, law enforcement sources told CNN on Tuesday.

Authorities said earlier that they are confident that Alexis was the lone gunman, bringing to an end a daylong police search for a possible second suspect.

MUST WATCH

JUST WATCHED

At least 12 dead in Navy Yard shooting

MUST WATCH

Alexis was carrying a military-contractor ID that matched his appearance, a D.C. Metropolitan Police official told CNN on condition of anonymity.

Alexis used that ID to gain access to the Navy Yard, according to a U.S. law enforcement official with knowledge of the investigation.

He drove onto the installation and parked before walking a short distance to Building 197. Once inside, according to the official, Alexis made his way to an overlook above the atrium and opened fire into the cafeteria.

Initial reports said Alexis used an AR-15 semiautomatic rifle during the attack, but by Tuesday, law enforcement sources with knowledge of the investigation said that was not the case.

It is believed that Alexis had rented an AR-15, but returned it before Monday's shooting, the officials said. Investigators have recovered three weapons from the scene, including a shotgun that Alexis is believed to have brought into the compound. The other two weapons -- handguns -- the sources say, may have been taken from guards.

While the FBI was urging anyone with information about Alexis to come forward, investigators were focusing on reported incidents, including police run-ins, that portray a man with increasingly violent tendencies.

Employment

Alexis was believed to have arrived in the Washington area last week, when he reportedly checked into a hotel, according to someone who met him at the hotel. The person, who declined to be identified, said Alexis indicated that he planned to be in the area for several weeks.

At the time of the shooting, Alexis was working for The Experts, a subcontractor of HP Enterprise Services that was contracted to "refresh equipment used on the Navy Marine Corps Intranet network," according to a statement released by the company.

Alexis, who had Department of Defense security clearance, worked from September 2012 through January refreshing computer systems in Japan, said Thomas E. Hoshko, the CEO of The Experts.

His security clearance was renewed in July to carry out the same type of contract work at the Navy Yard, Hoshko said.

Man hid in room during shooting

MUST WATCH

JUST WATCHED

Doctor : 'Put me out of business'

MUST WATCH

Alexis returned to work with The Experts that same month, he said. He worked at facilities in Rhode Island, North Carolina and Virginia for weeks at a time upgrading computer systems, Hoshko said.

No one reported having any problems with Alexis during those assignments, the chief executive said.

Alexis began working at the Navy Yard last week, though it was unclear whether he had actually begun working or was still securing his base clearance, Hoshko said.

Many surprised

There were no indications that Alexis had any ideological differences with the Navy or any disagreements with anyone at the Navy Yard, the U.S. law enforcement official said.

Alexis' family reeled at the news that he was believed to be the man behind the killings.

"What I do know is he wasn't that type of person," Anthony Little, who identified himself as Alexis' brother-in-law, told reporters outside his Brooklyn, New York, home. "I didn't really hear anything that would make me feel, as a newcomer to the family, that somebody should be watching him."

He said the family's initial reaction was "very distraught, very stressed out, tears."

"You know, they didn't see it coming," said Little, who is married to Alexis' sister Naomi. "Their hearts are going out more to the victims and the people that got hurt because, you know, there's more lives lost and we don't need that right now. We really don't."

Alexis, who was from New York City, served as a full-time Navy reservist between 2007 and 2011, according to military records.

In the Navy, he achieved the rank of aviation electrician's mate 3rd class, working on aircraft electrical systems, the records show.

Alexis was honorably discharged after a "pattern of misconduct," a U.S. defense official with knowledge of the investigation told CNN on condition of anonymity. The official did not detail the misconduct.

Most recently, Alexis worked as an information technology contractor with the Navy, Secretary of the Navy Ray Mabus told CNN's Wolf Blitzer.

Legal run-ins

Alexis appeared to have had sporadic run-ins with the law, dating back to at least 2004 when he was arrested in Seattle, accused of shooting out the tires of a man's truck in an anger-fueled "blackout," according to a Seattle Police Department report.

He told investigators he believed the man, a construction worker, was mocking him, but had no memory of shooting out the tires, the report said.

Investigators later spoke with Alexis' father, who told police that his son had anger management problems associated with post-traumatic stress disorder, which he suffered after working "as an active participant in rescue attempts" during the September 11, 2001, terrorist attacks in New York, the report said.

Alexis was arrested in August 2008 on a charge of disorderly conduct in DeKalb County, Georgia, county police said Tuesday.

And in 2010, Alexis was arrested by Fort Worth, Texas, police but never charged over an allegation that he fired a gun through the ceiling of his apartment. According to records, he told police he accidentally fired it while cleaning it.

His last known address was outside of Fort Worth, where he was roommates for three years with Nutpisit Suthamtewakul, who described Alexis as his best friend.

Alexis befriended Suthamtewakul four years ago after he emigrated from Thailand.

Alexis taught him about American culture, Suthamtewakul told CNN. Alexis, he says, was fluent in Thai and attended a Buddhist temple.

When Suthamtewakul opened the Happy Bowl Thai Restaurant, Alexis would occasionally help out, waiting tables, he said.

The two were roommates until five months ago, when Suthamtewakul got married and Alexis had to move out.

Toward the end, Alexis spent a lot of time holed up in his room, keeping to himself, Suthamtewakul said.

On Monday, Suthamtewakul was stunned by the news that Alexis was said to be the shooter in the rampage at the Navy Yard.

"I can't believe he did this," he said. "He never showed any sign of violence."

Frustrations

But there were signs that Alexis was unhappy.

He was having a hard time trying to get on his feet, said Suthamtewakul's wife, Kristi. He helped out at the restaurant but not for pay.

"He was using this as an educational experience to help learn Thai," she said. He enjoyed making deliveries to homes, where the language was spoken. He talked about moving to Thailand.

But to Suthamtewakul, Alexis seemed "frustrated with life."

She is grieving. "He was like one of our best friends, like a brother to us and always willing to go out of his way to help us out with things."

He was very frustrated with the company that contracted him to work for the Navy, according to another friend.

Alexis claimed he wasn't paid properly by the company after returning from a months-long assignment to Japan last year, said Michael Ritrovato, another former roommate.

It was unclear whether the dispute was over salary or expenses. Alexis just felt the company owed him money and had not paid him, Ritrovato said.

Gun knowledge

He is in shock over his friend's actions.

"He was an easygoing guy. I don't know of any reason for this," he said.

But Ritrovato knew Alexis was fascinated by guns. "He was ... knowledgeable with military rifles and handguns. At least he led us to believe he was. But nobody ever had the idea that he would use them in a derogatory way," he said.

It is not clear whether Alexis was still living in Fort Worth area at the time of the shooting.