An off-duty NYPD sergeant was beaten within an inch of his life outside a Queens diner early Sunday by a thug who kept brutally bashing his head as he lay sprawled in the street.
A sickening cell-phone video shows Sgt. Mohammed Deen get knocked to the ground, then repeatedly kicked and punched by a hulking brute identified by cops as Hayden Holder, 29, of Jamaica.
At one point, the video shows the attacker leaving Deen crumpled on the pavement as he tries to smash in the windows of the NYPD veteran's nearby white BMW 535i — with Deen's horrified wife locked inside, a police source said.
When the perp can't break the glass, the video — which was posted to Facebook — shows him returning to his motionless victim, smashing his head against the street and pummeling him some more.
"It was a vicious, savage beating,'' one stunned law-enforcement source said.
Sources said Deen — who had earlier exchanged words with Holder at a Queens nightclub — suffered critical injuries and was in a medically induced coma at Jamaica Hospital.
Holder, who was busted as he tried to run away from the South Richmond Hill scene, was charged with felony assault.
He glared at reporters but said nothing Sunday evening as cops took him from the 106th Precinct — dressed in a hospital gown from treatment for an injury to his hand — to court.
Sources said Holder confessed to the attack but did not know that Deen was a cop at the time.
He has previous arrests for criminal possession of stolen property, pot possession and graffiti, sources said.
Deen is an 18-year NYPD veteran who's currently assigned to the 32nd Precinct in Harlem.
The ugly incident unfolded around 5:30 a.m. outside the St. John's Express restaurant on Liberty Avenue, which serves take-out food through a window in its storefront.
A source said the two men had gotten into an argument earlier inside the Maracas lounge on Jamaica Avenue about a mile away.
It was unclear what sparked the initial confrontation, but Facebook user "Errol Johnson," who posted the video, wrote underneath: "Just left the club in queens n—a get knocked out for bumping another man. MUST WATCH THIS I caught it all worldstar."
Whoever shot the video was apparently laughing throughout the incident — and repeatedly saying "That n—a's dead!" — while other onlookers screamed in terror.
Holder's former neighbors in the Richmond Hill section of Queens described him as a troublemaker who frequently got into arguments and threatened people.
Mienkoemar Panchu, 45, said Holder often drank bottles of Corona and Heineken beer and tossed the empties into the street.
"He gets more hyper when he's drunk," Panchu said. "Everybody used to keep a distance on the block."