The gun was accidentally discharged, a spokesman for the Waldorf said. View Full Caption NYPD/Flickr/Jeffrey Zeldman

MIDTOWN — A bullet grazed a woman's head and injured three others after a gun went off in a man's pants at the Waldorf Astoria Hotel on Saturday, according to police.

The 9 mm Ruger gun "apparently accidentally" discharged in the 42-year-old man's right front pants pocket, striking the floor and ricocheting, according to a hotel spokesman and police.

Four people were injured in the incident, which took place around 7:23 p.m. in the building's Park Avenue lobby, authorities said. The incident took place at a wedding, according to the Daily News.

A 55-year-old woman was grazed in the forehead and a 59-year-old man got a fragment wound to the left leg, the NYPD said. Both were taken to Bellevue Hospital.

Another two bystanders were taken to St. Luke's Roosevelt Hospital with leg injuries and were released.

Vladimir Gotlibovsky, 42, of Mill Basin, was arrested for assault with criminal negligence, reckless endangerment and tampering with physical evidence.

Felix Gotlibovsky, 51, also of Mill Basin, was charged with criminal possession of a weapon and tampering with physical evidence.

The Waldorf said they were working with authorities to investigate the incident.

"This matter is currently under investigation by the New York Police Department...and as the safety and security of our guests and Team Members are the hotel’s top priorities, the Waldorf Astoria New York is cooperating fully with local authorities on this matter," said Waldorf spokesman John Walls in a statement.