Three NYPD officers were recovering at Bellevue Hospital Sunday after a man attacked them with a machete on New Year’s Eve just eight blocks away from the celebration in Time Square, police said.

The men were posted on the corner of West 52nd and 8th Ave after 10 p.m. Saturday when a 19-year-old man attacked them with the blade, Police Commissioner Keechant Sewell said at a press conference at the hospital Sunday morning. She did not identify the suspect.

Sewell said an officer who had just graduated from the police academy Friday suffered a gash to the head and a fractured skull in the attack. An eight-year NYPD veteran was also cut in the head, she said. The third officer was not seriously injured. They had all been released from the hospital by late Sunday, a police spokesman said.

One of the officers – police did not say which one – fired his weapon during the incident, striking the suspect in the shoulder. Sewell said the suspect is being treated for his injuries at the same hospital.

Both the NYPD and the FBI said at the press conference that the investigation is ongoing. They did not say whether the suspect has been arrested or charged.

Adams praised the officers’ response and training, particularly the rookie officer who he identified only as Paul.

“His role saved the lives of New Yorkers today,” Adams said. “It just goes to show that whether it's the first day or the last day, the actions that police officers must take everyday are life threatening situations.”

Correction: An earlier version of this article misstated how many officers were treated at Bellevue Hospital. All three officers were treated there.