A man made hateful comments to a transgender woman before shooting her in the face with pepper spray in what police are investigating as a hate crime attack in Queens, police said Tuesday.

David Gonzalez, 34, approached the 29-year-old in the area of Roosevelt Avenue and 82nd Street in Jackson Heights around 4:15 a.m. June 29 and allegedly made transphobic statements before spraying her in the eyes, cops said.

“This is for before,” he also told the woman.

Earlier that morning, around 3:50 a.m., a 43-year-old woman was the victim of a similar attack at the same intersection — in which 24-year-old Paola Custodio allegedly made anti-transgender comments and anti-gay slurs before spraying the victim in the chest with an unknown liquid.

Police said the two incidents were connected.

Custodio was arrested and charged with hate crime assault and harassment as a hate crime.

The second victim was taken to Elmhurst Hospital for burning and watery eyes, police said.

Gonzalez, whom police described as 6 feet tall and 170 pounds, is still on the loose. The NYPD Hate Crimes Task Force is investigating.