Correction: An earlier version of this story included an incorrect account of efforts by Alexis's employer, The Experts, to obtain a security clearance for him. The screening was not conducted by Lexis-Nexis but rather by the company to which it had sold its screening business. That firm confirmed with the Defense Department in June that Alexis's 2007 clearance remained valid and revealed no issues other than one minor traffic violation, according to The Experts. The story has been corrected.

Aaron Alexis’s friends in Fort Worth watched him begin to slip away last summer. He was depressed, sleepless, increasingly withdrawn. The guy who loved to throw back Heinekens with his buddies now wanted mainly to be left alone.

He told his friend Melinda Downs that he was seeing a counselor at the Department of Veterans Affairs, that at one point he hadn’t slept in three days. In July, Alexis’s best friend, the man who had shared his home with him, told police that Alexis had poured sugar into his gas tank to damage his car.

This summer, Alexis left Texas and headed north to work for a defense contractor. Since July, he’d been assigned to seven different military bases in four states and the District.

His employer, a tech company called The Experts, put him up at good hotels. He was in one of them, the Marriott in Newport, R.I., on Aug. 7 — 40 days before he would bring a shotgun into the Washington Navy Yard and kill 12 strangers — when just around dawn, he called the Newport police. According to the police report, he said he was hearing voices coming through the ceiling, voices of three people who had been sent to follow him and keep him awake, three people who were now using “some sort of microwave machine” to send vibrations into his body, preventing him from falling asleep. He needed help.

As a Navy reservist and a computer technician, Alexis moved around the country frequently. As a man who was losing touch with reality, he left a trail of police reports, arrest records and mental health consultations that in retrospect add up to a disturbing chronicle of rapidly mounting trouble.

Read eyewitness accounts from the Navy Yard shooting.

Alexis had had plenty of trouble in the past — shooting out a stranger’s tires, damaging furniture in a nightclub, blasting a hole in his neighbor’s floor — but arrests in Seattle, Georgia and Fort Worth over the past decade had stemmed from what he and friends called anger management problems. Alexis told friends he was suffering from post-traumatic stress disorder from what he saw in New York at the time of the Sept. 11, 2001, terrorist attacks.

But it wasn’t until recent months that Alexis sought help. He had been treated at two VA hospitals since the Aug. 7 incident in Rhode Island, according to two law enforcement officials who declined to be named because they were not authorized to release information.

Had Alexis’s employer known anything about his problems, he would not have been hired, said Thomas Hoshko, chief executive of The Experts.

“Anything that suggest criminal problems or mental health issues, that would be a flag,” Hoshko said. “We would not have hired him.”

The Newport police report quotes Alexis as saying that he had heard the same voices speaking to him “through the walls, floor and ceiling” at the Marriott, a Residence Inn in Middletown, R.I., and at a Navy base where he’d been working. Alexis said he was worried that the people following him were going to hurt him. He also said he had never had “any sort of mental episode.”

The two officers who visited Room 405 at the Marriott told Alexis to “stay away from the individuals that are following him,” according to Officer Seth Moseley’s report.

Newport police Lt. William Fitzgerald said Tuesday that there was no cause for an arrest or to bring Alexis in for observation: “People make a complaint like that to us all the time.”

Later that day, Newport Sgt. Frank Rosa Jr. reviewed the incident report and called the local naval station police and faxed them the report. “They said they would follow up,” Fitzgerald said.

Lisa Rama, a public affairs officer at Naval Station Newport, said base officials were cooperating with the FBI. She declined to comment on whether military police followed up.

The Navy on Tuesday revised its account of Alexis’s departure in 2011. Although the service had originally sought to kick him out with a less-desirable general discharge after he’d been cited for misconduct at least eight times, the Navy instead granted Alexis an honorable discharge when he applied to leave.

The Navy cited Alexis for insubordination in 2008, disorderly conduct in 2009 and extended unauthorized absences between 2008 and 2010, according to a Navy official who spoke on the condition of anonymity to discuss the alleged gunman’s personnel record. Alexis was also cited for minor offenses such as a traffic ticket and showing up late.

In Fort Worth, he had settled into a Thai immigrant community where he occasionally meditated at a Buddhist temple and worked and lived with a family that owns Happy Bowl, a Thai restaurant.

The restaurateur, Nutpisit Suthamtewakul, said he and Alexis got along well until last December, when Suthamtewakul got married and Alexis, who had written the best man’s speech for the wedding, “started being quiet” and keeping to himself.

The restaurateur’s wife, Kristi Suthamtewakul, said her car wouldn’t start on July 5 because someone had put sugar in the gas tank. Her husband called the police.

“Our car was locked in the garage, and [Alexis] was the only one who had keys to the house,” Kristi said.

Throughout his adult life, Alexis had grievances and episodes of anger that stuck in the memories of those around him.

In New York, where Alexis grew up, his manager at the Borough of Manhattan Community College, where he worked as a part-time clerical assistant from 2001 to 2003, recalled him as someone who held grudges longer and harder than others might.

“Somebody would make a mistake that he thought was a bonehead idiotic mistake, but he’d go on and on about it for weeks,” said Barry Williams, Alexis’s boss in the administrative computing office. “He’s not one of those guys who when they do something like this, everyone says, ‘Oh, he’s so quiet and nice.’ He had an edge.”

On Sept. 11, 2001, Williams was walking to work just blocks from the World Trade Center when he heard a low-flying plane and then a crash. Williams cannot recall what Alexis did that day, but Alexis’s father told Seattle police after his son was arrested there in 2004 that Aaron had helped with the rescue operation and had been traumatized by the experience.

The Seattle arrest came after Alexis fired three shots from a Glock pistol into the tires of a Honda Accord that construction workers had parked near Alexis’s house. Alexis told police that he had had “a blackout fueled by anger.” He was not charged after paperwork in the case was apparently misplaced.

Four years later, Alexis was arrested and held for two nights after he damaged furniture at the Velvet Room, a nightclub in De­Kalb County, Ga. After Alexis was ordered out of the club, he began cursing and “would not stop,” the police report said.

In 2010, he was arrested after firing a bullet through his upstairs neighbor’s floor in Fort Worth. Apartment managers then asked Alexis to leave.

None of those incidents was brought to the attention of The Experts, which hired Alexis in September 2012 to work at a base in Japan, said Hoshko, the chief executive.

“If there’s not full disclosure on this, how do they expect us to make good decisions about who to trust and hire?” Hoshko asked. The company said Alexis had worked since July at seven different military installations: in Little Creek, Va.; Newport; Stafford County, Va.; Bethesda; Cherry Point, N.C.; Arlington; and finally at the Navy Yard, where he began work a few days before Monday’s shootings.

Alexis obtained a secret-level security clearance in 2007, and it was updated this July. In that security review, approved by the Defense Security Service of the Department of Defense, a contractor was hired to run a background check. It’s not known if police reports about Alexis’s arrests surfaced in that check.

In New York on Tuesday, Alexis’s relatives remained behind the closed doors of a large red-tinted brownstone on Putnam Street in the Bedford-Stuyvesant section of Brooklyn.

Wendy Lopez, 36, who lived in an apartment just below where Alexis grew up in Flushing, Queens, remembered Aaron as the “kid with the basketball,” a polite neighbor and “typical teenager.”

Alexis arrived in Washington around Aug. 25, said Valerie Parlave, assistant director in charge of the FBI’s Washington Field Office. He had been staying at local hotels since then, most recently at a Residence Inn in Southwest, beginning on Sept. 7. 

On Saturday, Alexis traveled to Lorton in Fairfax County, to a gun shop called Sharpshooters, where he rented a rifle, fired it in the store’s shooting range, passed a background check and bought a Remington 870 shotgun and about two boxes of shells, according to the store’s lawyer, J. Michael Slocum.

Back in Fort Worth, Melinda Downs, owner of M&M Community Barbers, right next to the Thai restaurant where Alexis sometimes waited on tables, said her friend had called her twice in the past couple of weeks, from Rhode Island and from Washington.

She remembers how he used to come into her shop and spin around on the barber chairs. He was, she said, “the sweetest person I’ve ever known.”

“To know that a guy that you counseled and mentored, called friend, invited into your home, would do something so devastating,” she said, “you ask yourself, you go from denial, to reality, to fear, to blame, to ‘Is there something I could have done?’ ”

“I can’t fathom that he did this. It’s like Dr. Jekyll and Mr. Hyde. Who was this guy?”

Special correspondent Minora reported from Fort Worth. Marjorie Censer, David Fahrenthold, Tom Jackman, Carol D. Leonnig, Ann Marimow, Jerry Markon, Victoria St. Martin, Julie Tate, Theresa Vargas and Craig Whitlock in Washington, and Sally Jenkins, Rachel Weiner and Colum Lynch in New York contributed to this report.