A man in New York City has been sentenced to 13 years behind bars in connection with a homophobic attack on several men in the Bronx three years ago.

On Monday, Dan Rivera received 13 years and Elmer Confresi was sentenced to four years with five years of probation.

In October 2010 seven members of a street gang called the “Latin King Goonies” were charged with robbing, sexually attacking and torturing four men they thought were gay.

“As a part of their rules, it was against the rules to engage in homosexual behaviour,” said Bronx District Attorney Terry Gottlieb. “This defendant acting in concert with the other defendants assaulted various victims that they believed were having homosexual sex.”

Prosecutors say some of the victims were sexually assaulted with a plunger handle and a small baseball bat.

NY1 reports Dan Rivera only pleaded guilty to the burglary charges, after going to the home of one victim’s brother.

Rivera’s defence lawyer Jason Foy states he was only responsible for the burglary charges. “There was a violent sodomy that happened at a different location, and then they got the keys and access to an apartment where his brother was,” said Mr Foy. “My client was involved in going to that second location that had nothing to do with sodomy, going in, taking items, going to an ATM after the fact.”

Elmer Confresi entered a guilty plea to attempted gang assault and was sentenced to four years in prison and five years’ probation.

Other gang members who pleaded guilty in connection with the attack will be sentenced in the coming weeks.

The Bronx District Attorney’s office said the victims have agreed with the plea bargains, claiming that having to testify in a trial would be torture all over again.