Four Rikers Island guards were suspended for allegedly waiting several minutes to rescue an inmate who had tried to hang himself in a cell, authorities and law-enforcement sources said.

The guards — three correction officers and one captain — are accused of inaction during the near-fatal incident when Nicholas Feliciano, 18, allegedly attempted to hang himself at the George R. Vierno Center at about 12 a.m. on Nov. 28.

The captain had witnessed the incident on surveillance footage and went to the inmate to cut him down, sources said.

The detainee was rushed to a nearby hospital in critical condition, where he remained on Tuesday, a Department of Correction spokesperson said.

The city’s Department of Investigation opened an inquiry into the incident, the spokesperson added.

“The claims being made here are extremely troubling and we are taking them seriously,” DOC Commissioner Cynthia Brann said in a statement. “Three officers and one captain have already been suspended and if the outcome of the investigation warrants we will take appropriate disciplinary action up to and including termination,” Brann added.

The Legal Aid Society, which represents Feliciano, said in a statement Wednesday he has a “known mental health history of past suicide attempts.”

“Nicholas’ tragedy illustrates the dangers and horrors of relying on our broken parole and correctional systems to address a mental health crisis,” the statement said.

Legal Aid said it is asking state officials to drop the parole violation charge on which Feliciano was being held “given his critical medical health.”

Jail records show Feliciano was arrested on Nov. 19 for violating parole and was being held at the jail on Rikers Island.

Feliciano had been in an altercation at the jail earlier in the day of suicide attempt and had been moved from general population into a holding cell by himself, the Times said.

Video footage of the suicide attempt described to the Times shows him wrap one end of a piece of clothing around his neck and another to a pipe on the ceiling of the cell. He then stepped off a wall that separates the toilet from the rest of the cell and hangs from his neck.

At one point during the attempt, Feliciano appeared to have second thoughts and struggled to get his feet back on the wall. He hung from the pipe for about seven minutes before he was rescued.

The grisly incident comes as the City Council approved a plan in October to shut the embattled jail and replace it with four smaller jails in separate boroughs by 2026.

In an effort to keep offenders waiting for trial out of jail, New York State also passed a bail reform law that will go into effect in 2020 that will eliminate bail for an array of misdemeanor and felony charges.