The man accused of attacking two gay men in Brooklyn over the weekend has been arrested. Police say that Brandon McNamara, 25, turned himself in and was charged with assault, aggravated harassment, and harassment—all as hate crimes.

McNamara, a resident of Middle Village, has not been arraigned yet.

According to police, the two men had just left the Metropolitan Bar in Williamsburg at around 12:55 a.m. on Sunday morning, and were in front of 540 Metropolitan Avenue when a man approached them and "made anti-sexual orientation statements and assaulted them."

Then the man punched one man in the face, knocking him unconscious, and then, police say, "grabbed [another] and threw him against a tree, also rendering him unconscious."

The two were hospitalized for their injuries—one with fractured shoulder while the man who was thrown into the tree was treated for a broken finger.

The NYPD released a photograph of the suspect, who fled the scene. The victim who suffered the fractured shoulder told the Post that the attacker called them "f----t," adding, "He just sucker-punched me and was a drunk a—hole. We’re looking into [the attack] with detectives. I’m sure we’ll find [the suspect] sooner or later."