TRAVIS AIR FORCE BASE, Calif. — A mistaken report of a shooter prompted the lockdown of Travis Air Force Base in California on Wednesday in the midst of an emergency training exercise, officials said.

The base ordered people to shelter in place and lock their doors and windows. Gates were closed for more than an hour before the all-clear was given at the site 45 miles northeast of San Francisco .

“There were reports of gunshots at the Base Exchange. However, no shooter was found,” a base Facebook posting reported.

“There was a security exercise underway at the base and somebody took that to be an active shooter and they went from there,” said U.S. Rep. John Garamendi, who was briefed on the situation.

The scare came as the base was in the midst of a multi-day exercise to test and train personnel to respond to emergencies.

“These exercises mean everyone on base is on heightened awareness,” Col. John Klein, commander of the Travis-based 60th Air Mobility Wing, said in a statement. “Though it was a false alarm, our first responders reacted appropriately. We take every security incident, very seriously. I am confident in our ability to respond to any emergency situation.”

The alarm came on a day marked by violence.

In Virginia, a gunman wounded Rep. Steve Scalise and several others during practice for a baseball game featuring congressional Republicans.

James T. Hodgkinson, 66, was fatally shot by police who had been guarding Scalise, the House majority whip.

In San Francisco, a UPS employee opened fire inside a package delivery facility, killing three co-workers and himself, authorities said.