National Guard member Sarah Beckstrom, 20, died from her injuries, while the other officer Andrew Wolfe, 24, was critically injured and remains in hospital. Both were on assignment in the US capital from West Virginia.

The charging complaint, which includes photos from security-camera footage, lays out what prosecutors say happened last Wednesday near an underground train station while Beckstrom and Wolfe were on patrol with other National Guard troops.

The pair were dressed in military uniforms a few blocks from the White House at about 2:15 p.m. talking to two other Guard members when gunfire erupted.

A supervisor heard gunshots and saw Wolfe and Beckstrom collapse. He “immediately pulled his service weapon and engaged the defendant”, the complaint says.

“During the subsequent gunfight, the defendant was shot and fell to the ground.”

The supervisor said the shooter stopped firing and was trying to reload when another Guard member jumped on him, and Secret Service officers helped subdue the suspect, the complaint says.

Both Wolfe and Beckstrom had been shot in the head and were rushed to hospital. Beckstrom died the next day. An autopsy found the cause of death was a gunshot wound to the back of her head and the manner of death “homicide”.