In a rare victory against correction officers accused of inmate abuse, five New York City guards were convicted Tuesday in the 2012 beating of prisoner Jahmal Lightfoot.

After four days of deliberations, a state Supreme Court jury in the Bronx, New York, found the men guilty of first-degree gang assault, first-degree attempted assault, second-degree assault, falsifying records, official misconduct and efforts to cover up their crimes, the New York Times reported.

Convicted were former Rikers Island assistant security chief Eliseo Perez Jr. and officers Tobias Parker, Jose Parra, Alfred Rivera and David Rodriguez.

According to authorities, Lightfoot was tackled, then kicked repeatedly until both eye sockets were fractured and his nose was broken.

Jeffrey Richard, a sixth defendant who was not involved in the beating, was acquitted of charges in connection with the cover-up. Three other accused officers have decided to allow the judge to try them. Justice Steven Barrett is expected to deliver his decision Friday.

Prosecutors have fought fruitlessly to convict correction officers in cases of alleged abuse, largely because the victims usually elicit little sympathy from juries because of their criminal backgrounds.

Abuse of prisoners by correctional facility staff rarely brings convictions, but it is costly to the state of New York. The New York Daily News found earlier this year the state has paid out $10 million to prisoners over a five-year period ending in 2015. Despite the cost, prison officers rarely discipline subordinates they see physically abusing inmates.

“This is a problem endemic to correctional institutions across the country at every level,” Jeff Smith, author of “Mr. Smith Goes to Prison,” a memoir of his experience behind bars, told the Daily News.

Last year, the New York State Department of Corrections and Community Supervision said it began instituting a system of electronically tracking complaints against officers, a project that is expected to be completed this year.

A report by the Marshall Project and the New York Times found there were about 4,000 active investigations into prisoner complaints of mistreatment by prison staff. The state had about 53,000 inmates in more than 50 facilities.