More than an hour later, Mr. Bergosh entered the base with other county officials, and they made their way to the scene of the shooting. He saw blood and spent casings. Emergency medical workers had been treating the wounded. A helicopter was on hand for evacuations.

“There were hundreds of personnel,” Mr. Bergosh said. “It was an active crime scene.”

Two mothers were waiting to reunite with their families.

Two mothers who live on the base waited anxiously to return on Friday morning.

Rita, who declined to give her full name, sat in a cherry-red van with her three oldest daughters, whom she had taken off the school bus after the shooting started. Rita said she had heard four shots from her house, but assumed it was training — not an active shooter — until her husband, who works on the base as a substance abuse counselor, had called to ask if she and their daughters were safe.

Rita said she wasn’t able to get back on the base after she picked up her older daughters. She has three younger daughters who remained on the base with their grandmother.

Around 11 a.m., Rita was sitting in her van on the side of the road, parked in front of a bridge that leads to the base. It was blocked off by several police vehicles.

Near her, another mother also waited outside the base with two of her children. Lucy, who also declined to give her last name, said she had called her husband repeatedly after learning of the shooting, but he did not pick up until about the fifth try.

He told her to tell their children that he loved them, she said, and a mix of emotions — anger, sadness, fear — flooded over her. Her family was safe, but she was frustrated to be kept off the base, away from her two other children and her husband. She said her husband had been preparing for a pinning ceremony scheduled for members of the Navy on Saturday.

Reporting was contributed by Nicholas Bogel-Burroughs, Adam Goldman, Derrick Bryson Taylor, John Ismay, Lara Jakes, Eric Schmitt, Kalyn Wolfe, Ben Hubbard and Liam Stack.