For more than an hour Tuesday, patients, staff and visitors were locked down and barricading themselves in offices during what they were told was a report of an active shooter that drew swarms of Montgomery County police to Walter Reed National Military Medical Center in Bethesda.

But why that alert went out and whether it was a false alarm that sparked a genuine response or a drill preparation gone awry was murky for hours after the event in statements issued by the U.S. Navy and the officials at the medical campus near Washington. Through the afternoon, differing explanations were offered.

By early Tuesday evening, it appeared that the notification system that alerts to a shooter was used incorrectly by one of the organizations on the sprawling campus — but the organization was not identified.

“While preparing for an upcoming drill, the notification system was inadvertently enacted without containing the words ‘EXERCISE’ or ‘DRILL.’ Individuals who saw the mass notification statement immediately notified NSA Bethesda security, where they responded accordingly and instituted an installation-wide active shooter response,” a Navy statement said. “On further investigation, they determined that the improper use of the system was the root cause and secured from the active-shooter response.”

That explanation departed from a previous Navy statement that the response was an “ad hoc drill.”

Jeremy Brooks, a spokesman for Naval Support Activity Bethesda, said Tuesday evening that the call about the shooter to NSA Bethesda was the result of improper use of a mass notification system.

Walter Reed is one of several tenants in a military installation off Rockville Pike, just south of the Capital Beltway. NSA Bethesda provides “operational support” to the tenants, including security, Brooks said. Other tenants include the Navy Medicine Professional Development Center, the Uniformed Services University of the Health Sciences, the Armed Forces Radiobiology Research Institute, and the Armed Forces Blood Bank Center, according to NSA Bethesda’s website.

What was certain from the start was the anxiety and disruption created, a point that a congressman who happened to be on campus during the event stressed after the all-clear finally sounded.

Rep. C.A. Dutch Ruppersberger (D-Md.) was visiting Tuesday and had just finished a series of meetings when the warning came out.

The initial alert on the campus came at about 2:15 p.m. and said there was a “report of an active shooter in the Bldg. 19 basement.If you are on the installation, go to the nearest available vehicle, structure, or building that provides a measure of protection and lockdown.

Ruppersberger said “all of a sudden, people came out and told us to get back in the room; there’s an active shooter. They took everybody to a back room, kind of like a huge conference room, and barricaded the doors.” He said an announcement came over the loudspeakers every 20 minutes: “There is an active shooter. Security is on the scene.” He said a woman sitting next to him cried when she couldn’t reach her husband, a patient, and couldn’t get to her daughter being let out of school.

He said after about an hour, they were told the emergency was over and they were let out, only to be put back in the room for another 20 minutes.

Montgomery police had responded to the sprawling complex on Rockville Pike in Bethesda after receiving calls at 2:23 p.m.Staff and patients were locked down, and gates were closed to visitors.

Officer Rick Goodale, a Montgomery police spokesman, said that starting at 2:23 p.m., the department received a series of 911 calls about a possible active shooter at the installation that houses Walter Reed.

“Based on the number of calls we received, and the seriousness of the information, we sent as many cars as we thought might be needed,” Goodale said.

About 2 p.m., NSA Bethesda’s security unit received a call from within the complex of a possible active shooter in the basement of Building 19 of Walter Reed, Brooks said. The caller genuinely believed there was cause for concern, Brooks said.

“The person who called did the right thing,” Brooks said.

NSA Bethesda security issued lockdown orders, Brooks said. NSA Bethesda security searched the basement and other areas of Building 19 and did not find an active shooter, Brooks said.

Ruppersberger said, “In today’s world, with all these mass shootings, we have to be prepared and be ready,” but added, “I’m going to find out how this happened. Somebody messed up, especially given this is a hospital.” He noted the hospital has many patients injured in war and suffering from post-traumatic stress. “There’s a lot of unnecessary anxiety by people who think this is real,” he said.He noted the dangers of police racing to the scene, endangering motorists, and rushing in thinking they are about to confront a mass shooter.