MIDDLETOWN, N.Y. (AP) — Authorities say a man killed in a gunfight with security officers at an upstate New York courthouse was angry at the city's mayor and faced charges he menaced the mayor's daughter last year.

Timothy Mulqueen, of Middletown, opened fire with a 12-gauge shotgun on the lobby of his hometown court at about 9 a.m. Wednesday. Officers returned fire as people in the building dove under desks and scrambled for the rear door.

A court officer suffered a graze wound to the arm, and two other officers were treated for shock.

A state courts spokesman praised the officers for heading off the attack before others could be hurt.

The 43-year-old Mulqueen was fined $129 last week after his conviction for harassing the daughter of Mayor Joseph DeStefano.