Two fracases at Twin Cities hospitals this fall had different origins — one followed a shooting outside the Minnesota State Fair, the other a self-inflicted injury in Faribault — but police and hospital officials say both were inflamed by a common problem.

Both were preceded by social media messages that upset friends and relatives of the injured individuals and alerted them to which hospitals were treating the patients.

On Sept. 3, police officers arrived at a chaotic scene of at least 20 people fighting in and around Regions Hospital in St. Paul, and police used chemical and physical restraints to subdue the crowd that had arrived there after the State Fair shooting. Last week, 50 people or more congregated in the waiting areas outside North Memorial’s emergency department, where confusion over who was to blame for a patient’s traumatic injury contributed to high emotions and reports of fights and people banging on walls and locked doors.

Both cases actually showed that hospital lockdown procedures worked: The unrest was concentrated in the waiting areas and resulted in no injuries or harm to patients. At the same time, health officials were surprised by the size of the crowds and the misconceptions circulating about what had happened.

Rumors and disagreements can spark arguments and fights, especially in the fraught moments after a shooting or accident, law enforcement officials said, and now those rumors can spread in an instant via social media.

Such confusion is “one reason why we do a media release in those cases — to dispel rumors and clarify [events]. Some postings on social media said there was a shooting at the hospital, an officer was shot, etc.,” said Robbinsdale Police Chief Jim Franzen, whose officers called for assistance after arriving at North Memorial last week to find a larger-than-expected crowd.

Minnesota hospital officials didn’t have data available this week to show if lockdowns are becoming more common. But HCMC, the downtown Minneapolis hospital with a major trauma center, said in a statement: “Social media and traditional media may be used to spread incomplete or inaccurate information in the midst of an emotional and uncertain situation.”

Hospitals have intensified their security and safety measures in recent years amid some high-profile incidents, including the case of an agitated patient who swung a metal rod at nurses in St. John’s Hospital in Maplewood in 2014, and a patient who wrestled a gun away from an off-duty sheriff’s deputy at St. Cloud Hospital and shot him in 2015.

The Minnesota Hospital Association now has 100% participation from its members in safety training and the development of common standards and protocols to deal with unsafe or violent incidents, said Dr. Rahul Koranne, the organization’s chief medical officer.

Whether or not hospitals can counter inflammatory messages on social media, they can nonetheless train everyone on staff, from doctors to custodians, on de-escalation techniques when they encounter people who are upset, Koranne said.

“It could be social media today,” he said. “It could be a large multivehicle accident tomorrow. It could be [panic over] an infectious disease. We are used to a large number of distressed patients [and visitors] coming into our facilities.”

Lockdowns, which seal off access to patient areas when violence or unrest is reported at hospitals, remain rare. However, a union representative for hospital nurses said the incidents have at least increased in intensity, if not in number, which presents a hazard to the front-line workers in emergency departments and at triage desks.

“The gravity and intensity of each event seems so much more egregious than it ever was before,” said Carrie Mortrud of the Minnesota Nurses Association, who recommended increased hospital staffing so that more people are in position to spot unsafe situations that are brewing.

North Memorial and Regions are primary trauma centers in the Twin Cities, along with HCMC.

“People are concerned about their loved ones, and depending on the situation, emotions can escalate,” HCMC said in a statement. “That’s why prevention, early identification and de-escalation of high-risk situations are key to maintaining a safe, accessible campus.”

Exactly what happened at North Memorial remains in some dispute: One man who was arrested there on suspicion of trespassing and obstruction of justice has hired an attorney and circulated video claiming that he was not an aggressor and that the situation wasn’t as dire as police described.