RIKERS ISLAND, N.Y. — Gang members accused of attacking a correction officer and causing severe injuries may have been retaliating after he wrote one of them a ticket, sources said Monday.

Inmates Eric Morris, Samson Walston, Nazeem Francis, Steven Espinal, Jeffrey Valdez and Devin Burns were identified as members of the Blood gang, all under the age of 21, who attacked the officer on Saturday.

At least four of those accused are charged with gang assault and are set to appear in court Monday.

“That officer was a good officer, did his job, he wrote this inmate a ticket. The inmate wasn’t very happy about the ticket and decided that he was going to … knock out this ‘super cop,’” Husamudeen said.

A “super cop” being a nickname for when “we actually do our job,” according to Husamudeen.

Surveillance video captured the assault.

In the video, an inmate is seen punching Souffrant, knocking him to the ground, before several others began to beat the officer.

Another correction officer is seen in the background, standing back until two other officers ran into the room from another area and began to pepper spray the inmates.

When asked why the officer stood back, apparently not taking action, Husamudeen said he had no problem with how the officer reacted.

“If something else happened, guess who would have been able to actually address it, if anything else would have advanced. … So basically, he did a great job, they did a great job,” Husamudeen said.

In an interview Monday, Husamudeen also criticized Mayor Bill de Blasio for a policy banning solitary confinement at Rikers for inmates ages 21 or younger.

After the inmates are arraigned Monday, they will be sent back to Rikers and be allowed to have visits, watch television and have recreational time, according to Husamudeen.

“He’s taken away and watered down the other inmate disciplinary sanctions that we’ve been able to use in the past to modify or correct the behavior of these inmates. … He is out of control,” Husamudeen said.

The union president then called on the Justice Department to investigate gangs at Rikers.

The mayor has called to check on Souffrant, and released a statement through his spokesman, who tweeted: “The Mayor just spoke to the officer. We’ll get to the bottom of this heinous attack and hold those involved accountable. COs have one of the hardest jobs in city government – often thankless and always dangerous.”