Surveillance footage shows the disturbing moment a city correction officer was brutally beaten by a murder suspect this week.

The attack — which law-enforcement sources say left the officer’s nose and jaw broken — took place at the Brooklyn House of Detention at about 1:40 p.m. Tuesday.

In footage obtained by The Post, the rookie officer, identified by sources as Jian Yu, is seen closing a gate during a routine patrol of the area seconds before ­24-year-old inmate Pariis Tillery runs up the stairs shirtless and confronts him on the ninth floor.

As the showdown intensifies, two more shirtless inmates come up the stairs and the three surround the officer.

Yu ordered Tillery to step back, but he did not comply.

The clip shows the inmate repeat­edly punching Yu, then slamming him to the floor and kicking him.

Tillery then straddles the officer and continues punching him before walking away. Moments later, two correction officers rush up the stairs and find Yu unconscious.

Correction Officers’ Benevolent Association President Elias Husamudeen said Wednesday at a press conference that Yu was “beaten pretty bad.”

“He’s still in the hospital. He has a concussion [and] he’s still under observation by the hospital,” Husamudeen said, adding that the inmate who attacked Yu is a member of the Bloods street gang.

Tillery — who was busted on March 3, 2017, in the fatal shooting of Brooklyn resident Rysheen ­Ervin, 28, in 2016 — was rearrested on multiple charges, including assault, in the jailhouse ­attack.

Husamudeen called Yu “a good officer … As you can see from the video, he was doing his job despite of the circumstances.”

Husamudeen said “another officer sprayed [a] chemical agent through the gate [in a bid to stop the attack] before he was able to actually respond.”

Meanwhile, a city correction officer was attacked with a cane at a Rikers Island facility on Wednesday — this time by five Bloods gang members, Husamudeen said.

“All of this is going on while the commissioner does nothing,” said the union leader, calling on Correction Department Commissioner Cynthia Brann to resign and blaming Mayor de Blasio for the spate of assaults on correction officers.

Brann on Wednesday said in a statement, “Let me be crystal clear: As someone who has spent my entire career in law enforcement, there is nothing more important to me than the safety of our officers. We are making use of all the tools available to us to help keep officers safe and give them the support they need to carry out one of the most difficult jobs in this city, and any claim otherwise is utterly false.”

In the past two weeks, there have been five attacks on correction officers, according to Husamudeen.

Additional reporting by Yoav Gonen and Ben Feuerherd