WASHINGTON – Video taken inside Building 197 at the Washington Navy Yard shows Aaron Alexis “calmly” walking down the hallways and stepping into offices, firing indiscriminately at workers and reloading his shotgun with shells from the pockets of his black cargo pants, the FBI chief said Thursday.

The video, described by FBI Director James B. Comey, makes clear, he said, that the 34-year-old civilian contractor was not targeting any specific individuals Monday but rather was intent on killing as many people as possible, even shooting a security guard and grabbing his weapon to continue the rampage.

Comey said the assault lasted at least half an hour, until police cornered him, exchanged gunfire and killed him when he ran out of ammunition.

Alexis was shooting people, Comey said, “with no discernible pattern.” He said Alexis was “calmly moving without any particular direction or purpose. It was not as if he was looking for any particular person or group.”

Anthony Meely, chairman of the Fraternal Order of Police’s labor committee for the Navy Yard’s officers, said in an interview that the force was woefully undermanned Monday because of government cutbacks, which may have led to additional deaths.

There were only six patrolmen on duty instead of 11, all were posted at the gates, and only two patrol cars were available, he said. The only officer on patrol inside the yard was the chief of police, who was the first to reach the building, Meely said. The chief could hear the shots ringing inside and saw the private security guard at one of the entrances, Meely said. The chief told the guard to unholster his weapon and be prepared to return fire, Meely said, and when the guard did, Alexis shot him.

The other officers had to run from the gates to the building, which took “precious time,” Meely said, eight to 10 minutes. Then their radio batteries died, and officers had to fumble with cell phones to summon help, he said.

They could still hear shots inside, and finally some of them formed an “entry team” and started inside the building, the union leader said.

But adding to the confusion was that employees running away from the building gave conflicting reports, including accounts of more than one shooter, he said. “They were told about a person in a Hawaiian shirt. There was somebody with sideburns. There was somebody in a naval uniform.”

Meely summed up: “I believe the security guard might still be alive if we had had adequate staffing.” Instead, he said, “we were undermanned.”

A Navy official, who asked not to be identified, responded with a statement: “This is absolutely something we are looking at. We are aware of the union’s claims and they will be looked into as part of the review that has been ordered into the case.”

The FBI director, who held his first news briefing at bureau headquarters after taking over two weeks ago, said Alexis had been working as a civilian contractor at the Navy yard on a computer server refresher project, handling tasks throughout the building, which made him familiar with the layout of the most crowded facility on the base.

In fact, Comey said, at one point Alexis opened a door and shot a maintenance man as though he knew he would be working outside.

He added that despite earlier reports, Alexis never sprayed sniper fire on employees in an atrium plaza from above, but instead roamed the halls and offices on several floors, firing at will, for 30 minutes.

Alexis drove to the base about 8 a.m. and parked, Comey said. He got out of the car with a bag, crossed a street, entered the building and went to the fourth floor. There, he entered a bathroom and came out with a Remington 870 Express shotgun but not the bag, the FBI chief said.

What authorities do not know yet, Comey said, is whether the weapon was in the bag all along or whether Alexis might have planted it in the bathroom earlier. He added that the shotgun had been “cut down” — that both the wooden stock and the barrel had been shaved for easier handling. Alexis had purchased the weapon two days earlier.

Comey said the rampage ended only when Alexis ran out of ammunition. “He was isolated and pinned down by the first responders,” he said.

The FBI has definitely ruled out any collaborators, he said. “None. No sign of that.” But Comey noted there had been “some confusion” because of reports about other people running toward the gunfire, perhaps in efforts to stop the gunman.