The United States Department of Justice. EPA/JIM LO SCALZO

A federal judge in Texas sentenced two men each to 15 years in prison Wednesday for a brutal 2012 attack on a gay black man, the Department of Justice announced.

According to court documents, Ramiro Serrata Jr., 23, and Jimmy Garza, 33, invited the man into a Corpus Christi apartment in March 2012, then launched what amounted to a three-hour torture session. Prosecutors said the pair punched and kicked the man and assaulted him with a frying pan, mug, broom, belt and battery-filled sock. They poured bleach in his eyes, sodomized him with a broom handle and struck him in the head with a gun, prosecutors said.

When the man began to bleed, prosecutors said, Serrata and Garza forced him to strip naked and clean the blood. All the while, prosecutors said, they used homophobic and racist slurs, including repeatedly calling the man a slave while whipping him with a belt.

Serrata and Garza pleaded guilty in September to conspiracy to commit hate crimes and to violating the Shepard-Byrd Hate Crime Act. Their attorneys did not immediately return messages seeking comment. Prosecutors said the men admitted the attack was motivated by the victim’s race and sexual orientation. As a part of their sentence, they will also be required to register as sex offenders.

In a statement, Principal Deputy Assistant Attorney General Vanita Gupta, head of the Justice Department’s Civil Rights Division, said the sentencing “makes clear that assaults based on bias and hate will not be tolerated in this nation.”

“These crimes violate both our civil rights laws and most basic national value,” Gupta said.

Prosecutors said the man eventually escaped the apartment by jumping out a window and running away until he was discovered by police. A third defendant, Carlos Garcia Jr., also pleaded guilty in the case to making false statements to a law enforcement officer and is awaiting sentencing.