Marines and sailors risked their lives for one another in Chattanooga last week, trying to distract the gunman who assaulted a naval center here, helping people scale a fence to reach safety and returning fire at the attacker, law enforcement officials said on Wednesday.
Some of the five servicemen who were fatally wounded effectively sacrificed themselves during the assault on Thursday, diverting the gunman away from a larger group of potential victims, according to a law enforcement official briefed on the investigation into the killings.
“This could have been a lot worse,” said the official, who did not want to be identified because he was not authorized to discuss the investigation. “It could have been a horrible, horrible massacre — so much worse.”
“A service member from inside the facility observed him and opened fire on him, firing several rounds at him,” said Edward W. Reinhold, the special agent in charge of the F.B.I.’s Knoxville office. Two guns belonging to service members were recovered from the scene, he said, and “at least one of those weapons had been discharged.”
Mr. Abdulazeez had written about the submission to God demanded by Islam, about martyrdom and suicide, and about seeing the world as a dark and painful place.
Investigators are trying to determine whether he came into contact with extremists who might have radicalized him, inspiring or even directing his attack. But Mr. Reinhold cautioned on Wednesday that it was too early to answer such questions, saying that agents were pursuing nearly 400 leads in the case.
“At this point we’re treating him as a homegrown violent extremist,” he said.
“We do not have any indication that anyone else was assisting him that day,” he added, but he did not address the possibility of prior help.
The four Marines and one sailor who were fatally shot were all apparently killed by Mr. Abdulazeez, Mr. Reinhold said when asked about the possibility that the police or a fellow service member had accidentally shot any of the victims.
“All indications are — and we do not have the ballistic reports back — preliminarily, it looks like all victims were killed with the same weapon,” he said.
Offering new details on the shooting, Mr. Reinhold described a chaotic and terrifying confrontation at the naval training center, lasting just three to five minutes.
Mr. Abdulazeez, 24, first drove up to a military recruitment office and, without getting out of his rented silver convertible, opened fire.
Then he raced off, with the police not far behind, and at the naval training center a few miles away, he crashed through the security gate and got out of his car with an assault rifle — apparently the only weapon he used — and a handgun, leaving a third firearm in the car. He fired as he approached the building, and shot the first person he encountered inside, Mr. Reinhold said, as others scrambled for cover.
“The shooter made entry into the building, proceeded to move through the building, pursuing the sailors and Marines who were attempting to evade him,” Mr. Reinhold said.
Maj. Gen. Paul W. Brier of the Marines said: “Our Marines reacted the way you would expect, rapidly going room to room, getting people to safety. After they had gotten to safety, some willingly ran back into the fight. All of us can be extremely proud of what our Marines did that day.”
Mr. Abdulazeez went out through the back of the building, Mr. Reinhold said, and into the fenced-in motor pool area, where “two service members attempted to provide cover and assist the military personnel attempting to get over the fence.”
It was there, he said, that four of the five victims were killed and that the police caught up to the gunman. In the shootout that followed, an officer was wounded, and Mr. Abdulazeez was killed.
“There were hundreds of rounds fired” by Mr. Abdulazeez and the Chattanooga police, said the law enforcement official who spoke on the condition of anonymity, making for an unusually complex forensics effort to piece together what happened. He said that Mr. Abdulazeez used a derivative of an AK-47 assault rifle.
Witness accounts and the volume of shots fired have raised questions about whether the gun was fully automatic, or had been modified to be operate that way. Mr. Reinhold did not confirm the specific type of assault rifle used, but said none of the weapons had been modified.
He said investigators know where the guns were purchased, but he would not say where, or whether they were bought legally.
The gunman killed Gunnery Sgt. Thomas Sullivan, Staff Sgt. David Wyatt, Sgt. Carson Holmquist and Lance Cpl. Squire Wells, all of the Marines; and Randall Smith, a Navy petty officer second class.
Mr. Abdulazeez was born in Kuwait to Jordanian parents, but had lived most of his life in the Chattanooga area and was a naturalized American citizen. Investigators are combing through his electronic communications and his travel history, including a seven-month stay in Jordan last year.
One of his uncles has been detained in Jordan for questioning by American and Jordanian intelligence officials.
“The F.B.I. will explore every possibility and every relative that he has, no matter where they are located,” Mr. Reinhold said.