NEW YORK (Reuters) - Six guards at New York City’s Rikers Island jail complex were sentenced on Friday to prison for the 2012 beating of an inmate that left him with fractured eye sockets and a broken nose.

A car exits the Rikers Island Correctional facility in New York March 12, 2015. REUTERS/Brendan McDermid

It was one of the highest-profile prosecutions brought against Rikers employees in recent years as city officials worked to combat the violence and corruption that have plagued Rikers for decades.

Justice Steven Barrett in Bronx Supreme Court handed the longest sentence of 6-1/2 years to Eliseo Perez, 49, who was an assistant chief for security at the time of the attack.

Perez told inmates, “Somebody’s leaving in an ambulance tonight,” before the beating on July 11, 2012, according to prosecutors. Then Perez and a captain, Gerald Vaughn, ordered several officers to assault Jahmal Lightfoot to send a message to other prisoners.

Vaughn, 49, was sentenced to 5-1/2 years in prison.

Justice Barrett imposed 4-1/2-year sentences on officers Alfred Rivera, 47; Tobias Parker, 46; Jose Parra, 47; and David Rodriguez, 41.

Two other guards, Harmon Frierson and Dwayne Maynard, were convicted in June of misconduct for helping to cover up the attack. They avoided prison on Friday and instead were each sentenced to 500 hours of community service.

“I hope these sentences will deter those who think a uniform and a badge give them license to brutalize inmates or cover for officers who do,” Bronx District Attorney Darcel Clark said.

A ninth guard was acquitted at trial, while a 10th guard charged in the attack has yet to face trial.

Mark Peters, the commissioner of the city’s Department of Investigation, which helped build the case against the officers, said the sentencing provided a “measure of justice” for the man who had been beaten.

“DOI’s investigations exposing and preventing the types of corruption that fuel violence have resulted in more than 30 arrests of Correction Department officers and staff over the last two years and led to dozens of reforms,” he said.

Defense lawyers had argued at trial that Lightfoot’s story had been fabricated and the guards were defending themselves against a violent prisoner.

Rikers Island is one of the country’s largest jail complexes. Mayor Bill de Blasio has implemented a number of reforms to help rectify long-standing problems there, including hiring more staff, changing recruitment and training protocols for guards, and tripling the number of cameras.