Updated

A man believed to be a member of the vicious MS-13 gang viciously beat a fellow inmate in a New York prison while guards watched the attack, a lawsuit alleges.

Rafael Lopez, 53, said a fellow inmate, Douglas Mendoza, 24, attacked him with a sock filled with padlocks in Sept. 2016 at the Metropolitan Detention Center in Brooklyn, the Daily News reported.

The alleged incident occurred when prisoners were watching television and Mendoza changed the channel from a baseball game, according to the lawsuit. Lopez alleges Mendoza changed the channel as a “power play to up his status” in the gang, the Daily News reported.

VIRGINIA GIRL WHO WAS ALLEGEDLY ABDUCTED BY MS-13 GANG MEMBER REPORTED MISSING AGAIN

An argument ensued after the channel was changed back but the confrontation was initially diffused, the lawsuit stated. Mendoza went back to his cell, however, and came back to the recreation room with his weapon -- a sock full of padlocks -- and began pummeling Lopez with it, the lawsuit stated.

Lopez suffered broken ribs and a lacerated kidney in the assault.

Lopez said Mendoza was known to officers for being violent and having mental problems. But two officers in the room did not try to stop the attack right away, the lawsuit stated. After some time, riot officers got involved and stopped the beating.

Lopez said the Sunset Park staff did not know how to keep Mendoza from him in the detention center so they placed him in special housing before Lopez was transferred three months later to a jail in New York City. Lopez, who was charged with drug distribution conspiracy, remains behind bars in the Manhattan jail.

SESSIONS: ALL BETS ARE OFF IN HUNT FOR MS-13 STREET GANG

Mendoza, who was in prison after being charged with murder in 2010, reportedly suffered from mental health issues and inmates warned the reputed gang member was “armed and dangerous,” the lawsuit alleged. The inmate alleged Mendoza was given a psychiatric exam but was never medicated.

The lawsuit stated a judge said Mendoza “made motions with his body which are not normal” and had a “faraway look in his eyes.” Mendoza's case was pending, the Daily News reported.

The Bureau of Prisons declined to comment on the matter.