A man who was killed early Sunday morning was defending his gay friends from a man who said "I hate you (expletive) gays, I'm going to kill you all here," witnesses told the Palm Beach County, Florida, Sheriff's Office.

>> Read more trending news

Nelson Hernandez Mena, 48, was arrested and charged with first-degree murder. He made a court appearance Monday morning.

The incident happened after Mena followed a group from a Salvadoran restaurant in Lake Worth, a witness told police.

The victim, Juan Javier Cruz, 22, died in the shooting. Multiple witnesses confirmed that Mena followed Cruz and his friends out of Restaurante y Pupuseria Las Flores in downtown Lake Worth and threatened them for being gay.

According to one bystander, Mena told Cruz right before the shooting, “If we were in my country I’d kill all of you like rats.”

After Cruz defended his friends, Mena, who later admitted to having consumed 15 or 20 beers that night, pulled a handgun from his pants and began shooting, the report said.

Cruz was killed by the gunfire and a bystander was shot in the ankle, according to police. The bystander later told police that he had asked Mena’s friend for his phone number earlier and believed that was what made him angry.

Cruz and Mena were both with groups of friends eating and drinking inside Las Flores before the shooting, according to the PBSO report.

Mena was denied bond Monday morning by Judge Dina Keever-Agrama. The family of Cruz appeared in court hoping that the judge would “do the right thing” and send Mena to jail, Cruz’s cousin Brenda Carballo said.