Fearing that a man who had just been released from jail the night before was back with a gun, authorities on Thursday morning placed the Dakota County Government Center on lockdown for about 30 minutes.

The nearby Hastings High School was also locked down while law enforcement and Hastings Police investigated after a deputy in the government center’s parking lot heard the man yelling that he had a gun. Several witnesses also heard the man yelling, said Dakota County Sheriff’s Office Deputy Chief Joe Leko.

A cursory search turned up no gun, but deputies found the 37-year-old intoxicated man, who had been booked earlier for fifth-degree assault, was carrying an unopened bottle of Captain Morgan Spiced Rum, the sheriff’s office said.

“He was cooperative” when he was arrested inside the complex at 1590 Hwy. 55, Leko said.

The building housing administration, judicial, law enforcement and juvenile services centers was alive with activity as the incident began just as morning court proceedings were about to begin. With so many people in the area, the building immediately went into lock down.

In a statement posted on the Hastings Public Schools’ website, the high school was also locked down as a precaution because it is close to the government center, the district said.

The suspect was released from jail Wednesday night and was due in court Thursday. The man was detained, but later released because there was no sufficient evidence that he posed a threat, the sheriff’s office said.

The lockdowns at the government center and the high school were lifted shortly after 9 a.m.