A man walked into the East Baltimore district courthouse Friday morning, pulled out a gun and shot himself, authorities said. A bailiff also fired their weapon at the man, but it wasn’t immediately clear who fired first.

Police Commissioner Richard Worley, at a news conference late Friday morning, said the 35-year-old man was in critical condition. The courthouse is closed for the remainder of the day.

The Maryland Attorney General’s Office is investigating the shooting, as required under state law.

The morning started like any other, with attorneys, law clerks and clients headed into Eastside District Court on North Avenue. Folks were milling about, waiting to go into courtrooms that had not yet opened for the day.

The Baltimore Banner thanks its sponsors. Become one.

But then a man walked into the courthouse and began yelling.

Apparently experiencing some mental health crisis, the man was not yelling at anyone particular but was loud and disruptive, said Andy Alperstein, an attorney who was in the lobby at the time of the shooting.

Then, Alperstein said, someone in the lobby yelled “Gun!” and panic ensued. Alperstein said he whipped his head around and saw the man holding a dark object that looked like a gun.

“We all took cover,” he said. “We heard two shots right next to one another. No one knows what is going on, it’s very scary. There was a child there.”

The father of Alperstein’s client is a doctor, and he ran over and began providing medical assistance to the man, Alperstein said.

The Baltimore Banner thanks its sponsors. Become one.

“We hope that the victim is able to survive,” Mayor Brandon Scott said at the news conference outside the courthouse. “We have to have serious conversations about, continue to have serious conversations about, behavioral mental health and how that relates to when we talk about access to firearms.”

The shooting took place right in front of the security station — equipped with metal detectors — at the courthouse. The man was barely inside the front door when he shot himself, according to witness accounts.

No one else was reported to be injured.

This is a developing story and may be updated.