An active-shooter scare Tuesday on the Bethesda, Maryland, campus of Walter Reed National Military Medical Center turned out to be a false alarm. But authorities had thought the threat was very real, despite the Navy saying on Twitter that it was just an "ad hoc drill."

Walter Reed National Military Medical Center is seen on Tuesday, Nov. 27, 2018, in Bethesda Md. The Navy says a drill was taking place at the Maryland base that’s home to Walter Reed where an active shooter had been reported. Naval Support Activity Bethesda tweeted that no shooter had been found and personnel could move about the Maryland base freely. (AP Photo/Jose Luis Magana) AP/Jose Luis Magana Montgomery police block the entrance of Walter Reed National Military Medical Center Tuesday, Nov. 27, 2018, in Bethesda Md. The Navy says a drill was taking place at the Maryland base that’s home to Walter Reed where an active shooter had been reported. Naval Support Activity Bethesda tweeted that no shooter had been found and personnel could move about the Maryland base freely.(AP Photo/Jose Luis Magana) AP/Jose Luis Magana Cars are prevented from entering or exiting the Walter Reed National Military Medical Center, Tuesday, Nov. 27, 2018 in Bethesda, Md. Security officers found “no indication” of an active shooter after reports from Walter Reed National Military Medical Center outside Washington, officials said Tuesday.Naval Support Activity Bethesda tweeted at 2:15 p.m. that an active shooter had been reported in the basement of a building at the Maryland base. (AP Photo/Michael Kunzelman) AP/Michael Kunzelman Montgomery County police block the entrance to Walter Reed National Military Medical Center amid reports of an active shooter. Officials later said the reports were a false alarm. (WTOP/Dick Uliano) WTOP/Dick Uliano The Walter Reed National Military Medical Center in Bethesda was locked down for about an hour Tuesday after a report of an active shooter. Officials later said the report was a false. (WTOP/Dick Uliano) WTOP/Dick Uliano Screenshot of an email received by a Walter Reed employee. The email refers to a “Real World Active Shooter” and contains words: “THIS IS NOT A DRILL.” Navy officials later said it was an ad hoc drill. Montgomery County police block the entrance to Walter Reed National Military Medical Center after a report of an active shooter. Officials later said the reports were a false alarm. (WTOP/Dick Uliano) WTOP/Dick Uliano The “all clear” has been given at Walter Reed following lockdown traffic moving both directions of Route 355. @WTOP pic.twitter.com/93BI1NOg1J — Dick Uliano (@DickUliano) November 27, 2018 (WTOP/Dick Uliano) ( 1 /8) Share This Gallery: Share on Facebook. Share on Twitter. Share via email. Print.

WASHINGTON — Authorities at Walter Reed National Military Medical Center are piecing together what happened during a tense Tuesday afternoon, when a reported active-shooter situation turned out to be a false alarm.

It was an incident that was further complicated over social media, with the Navy at one point claiming the scare to be caused by an “ad hoc drill.”

“The final cause of where the original confusion came from is what’s under investigation,” said Jeremy Brooks, a spokesman for Naval Support Activity Bethesda. “That’ll take a little bit of time to put together, so we’re clear on what happened, and if there was something that was preventable, to make sure it doesn’t happen again.”

Someone “legitimately thought that there was a situation” and did the right thing in contacting security, Brooks said, “and security did the right thing and responded, because it was not reported as an exercise or a drill.”

In a statement Tuesday evening, the Navy attributed the incident to “the improper use of a mass notification system.”

The Navy said that the Naval Support Activity Bethesda notification system was inadvertently activated while preparing for an upcoming drill, without the words “exercise” or “drill.” People who saw the notification contacted security at the Maryland base, which launched an active shooter response.

For roughly two hours, authorities worked to secure the busy hospital while patients, workers and visitors sheltered in place. The neighboring campus of Stone Ridge School of the Sacred Heart was also put in temporary lockdown, and traffic was halted in both directions of busy Rockville Pike while police conducted a building-by-building search.

“Military drills are definitely planned and prepared,” Brooks said. “And if there had been a drill, then we would have put out a statement saying it was a drill and it would have been advertised as such.”

The timeline of the incident, much of which played out over social media, indeed reflects confusion among authorities as they worked to secure the busy hospital.

Walter Reed officials issued an alert — via email and text — at around 2 p.m., indicating that there was “an active shooter on the compound.” At 2:58 p.m., the Navy tweeted out that they were “aware of reports of an active shooter” but qualified it with no confirmation. The Pentagon quickly retweeted that.

The Navy later tweeted at 3:25 p.m. that there was in fact no shooter, and that it was an “ad hoc drill by tenant command.” Montgomery County police, however, told WTOP that they had been called as if it were a real incident. (They referred additional questions to NSA Bethesda.)

NSA Bethesda officials, however, indicated at around 4 p.m. that a call had in fact been made to security “with the report of an active shooter situation” in Building 19, which is the site of the Murtha Cancer Center.

Rep. Dutch Ruppersberger — a Democrat representing Maryland’s 2nd District who was on the grounds at the time of the incident — tweeted out that when he and dozens of others had been moved to a safe room, there was no indication that it wasn’t real.

We’ve been given the all clear at Walter Reed – at no point was there any indication that this was a drill. — Dutch Ruppersberger (@Call_Me_Dutch) November 27, 2018

“People were scared and upset. Drills are important and today was a valuable learning experience for me, but training exercises must be properly communicated,” he wrote.

A nurse at Walter Reed, Mary Lock, said she and other employees remained locked down in a second-floor clinic for an hour after hearing this repeated announcement over a loudspeaker: “Active shooter, this is not a drill!”

Lock, 58, said they have had drills for events like this, so she didn’t panic.

“It is nerve-wracking as all get out,” she told the Associated Press with a laugh as she left work to catch a bus.

Others who claimed they were on the grounds said the incident was not characterized as a drill. …

That’s not accurate. I was there and repeated announcements saying “not a drill”. Incident Officers said the message was not supposed to be sent. It was a MISTAKE. Not a drill. — Tiffany | Angelle Media (@TiffAngelle) November 27, 2018

The announcements said “this is not a drill”. Had some nervous people in my room. :p#WalterReed #ActiveShooter — Technoviking (@DasTechnoviking) November 27, 2018

WTOP’s Max Smith and Dick Uliano and the Associated Press contributed to this report.