MIDDLETOWN, N.Y. (AP) — Authorities say a man who fired a shotgun at an upstate New York courthouse has been wounded by a court officer.

Eyewitnesses tell the Times Herald-Record of Middletown that a gunman was spotted on the steps of Middletown City Hall at about 9 a.m. Wednesday. They say he then ran to City Court, where he fired once into the entrance door before being shot.

A spokesman for the state Office of Court Administration tells The Associated Press the man opened fire with a 12-gauge shotgun. He says a court officer suffered a graze wound to one of his arms.

He says two officers were taken to the hospital for treatment of trauma that wasn't physical.

The gunman was also taken to a hospital. Authorities haven't released his name and condition.