A US Navy medic shot and critically wounded two people at a Maryland business park, then fled to a nearby military base where he was shot and killed, police and navy officials said.
The gunman entered a business at the Riverside Tech Park, causing people inside to flee, but it was unclear if the shooting took place inside or outside, Frederick Police Chief Jason Lando said.
After the shooting, the suspect drove about 10 minutes to Fort Detrick, where he was shot by police who followed him onto the base, Mr Lando said.
The navy did not release further details.
A statement from the Pentagon said that an "active shooting incident" on the base involved a navy medic who was later killed.
Mr Lando said: "We have two different scenes.
"All I can tell you is that we have confirmed there is only one shooter.
"The public is no longer at risk.
"Everyone is safe."
The US Navy tweeted: "The US Navy can confirm there was an active shooter incident at Fort Detrick, MD involving US Navy Sailors.
"The shooter, a Navy Hospital Corpsman, is deceased. We will continue to update with additional details as the situation evolves."
Cover image: A library picture of the Veterans Gate at Fort Detrick (Picture: USAG Public Affairs).