Updated

A man killed in a gunfight with security officers at a courthouse Wednesday was angry at the city mayor and facing charges he menaced the mayor's daughter last year, according to authorities and court documents.

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

"He had more rounds for the shotgun and had he made it past the officers, who knows what mayhem might have ensued," said David Bookstaver, spokesman for the state office in charge of New York's local court system. "It appears at this point that the officers may have saved countless lives."

The 43-year-old Mulqueen died at a hospital. One of the officers suffered a graze wound to the arm, and two others were treated for shock.

Police and witnesses said Mulqueen rode a motorcycle to the city's downtown, approached City Hall at first and then ran to the courthouse in Middletown, a city of about 25,000 in the Hudson Valley about 60 miles north of New York City.

Orange County District Frank Phillips said the investigation is continuing and it wasn't immediately known how many shots were fired.

Mulqueen's motive wasn't clear, but court records show he had been arrested on menacing, trespass and harassment charges after an encounter with the 23-year-old daughter of Mayor Joseph DeStefano at their home in August.

Nicole DeStefano told police she heard a "violent knocking" on her front door on the evening of Aug. 6 and answered it to find Mulqueen asking for her father.

"This person then got agitated after I told him my father was not home. This person started to make violent hand gestures and he began to yell at me," DeStefano said. "The way this person was behaving made me fear for my safety."

She said he was dressed in a camouflage hat and black shirt and was carrying a black satchel.

Mulqueen was arrested after her family filed a complaint with police.

"Yeah, I knew it was Joe-Joe's house. I needed to talk to him about something," he told police. "I don't want to talk with you."

The mayor didn't return calls for comment Wednesday. Nothing in the documents explains Mulqueen's anger at him.

On Feb. 1, Mulqueen was convicted on the harassment charge and fined $129.

His lawyer didn't return a call Wednesday.