Security guards open a gate for a motorist at the visitor entrance to Fort Lee, Va., on Monday. A female soldier with a gun inside a key building at a Virginia base turned the weapon on herself. (Steve Helber/AP)

A soldier at Fort Lee died Monday, hours after barricading herself in an office at the Army post and shooting herself in the head, officials said. The shooting prompted an early morning “active shooter” alert that briefly shut down the fort south of Richmond.

Maj. Gen. Stephen Lyons, the post commander, said the soldier was a sergeant first-class with 14 years in the Army.

Her name will not be released until at least 24 hours after her family is notified, per Defense Department policy. She was pronounced dead at the Virginia Commonwealth University Medical Center in Richmond.

“We’re going to keep her in our prayers. She’s a soldier, she’s one of our teammates,” Lyons told reporters gathered outside the base before she succumbed to injuries.

The military’s last active-shooter incident on a base occurred April 2, when Army Spec. Ivan Lopez opened fire in several locations at Fort Hood, Tex., killing three people and wounding 16 before killing himself.

Lyons said the soldier at Fort Lee was “upset and enraged,” but the general declined to comment on the soldier’s mental health status or what may have prompted her actions.

The soldier had been assigned to the Virginia base for almost three years and was previously deployed to Iraq in 2007 for 15 months, Lyons said.

“We are sad for our soldier in arms that she faced those kind of challenges that she felt that she had to resort to those kinds of actions,” he said. “At the same time we’re grateful because this situation could have been worse.”

Lyons said the soldier entered a headquarters building, No. 5020, about 8:45 a.m. with a small-caliber handgun that was not a service weapon. Soldiers and civilians sheltered in place or evacuated as directed. The base has a daily population of about 34,000.

Fort Lee police responded within two minutes and quickly established a dialogue with the soldier, Lyons said. At some point, she barricaded herself in an office and went into a “bit of a rampage,” exhibiting “irate actions” by throwing things around inside the office, he said.

Law enforcement officers communicating with her from outside the door thought they were progressing in talks when she shot herself.

Army Major General Stephen Lyons speaks during a news conference at the base in Fort Lee, Va., on Monday. (Steve Helber/AP)

“They thought that they had achieved a calm level of negotiations only to find out that that was not the case,” Lyons said.

Normal operations at the base resumed within an hour, he said. The investigation is ongoing.

Craig Whitlock, Dan Lamothe and Peter Hermann contributed to this report.

Get updates on your area delivered via e-mail.