Former Rep. Beto O’Rourke defended his fellow Democratic presidential contender Pete Buttigieg after the South Bend mayor was heckled during an event in Texas Friday.

Buttigieg, 37, spoke to a crowd at the Dallas County Johnson Jordan Dinner when protesters interrupted his speech, CBS-DFW reported. The protesters appeared to shout homophobic messages, the Texas Tribune reported. The mayor of South Bend, Ind., who is openly gay, responded to the hecklers saying, “I’m thinking of that scripture that says blessed and do not curse.”

“To that moment when I was packing my bags for Afghanistan for the purpose of defending that gentleman’s freedom of speech,” Buttigieg said. The mayor is an Afghanistan War veteran.

WHO’S RUNNING FOR PRESIDENT IN 2020? GROWING FIELD OF CANDIDATES JOIN RACE FOR DEMOCRATIC NOD

O’Rourke, a Texas native who is also running for president in 2020, tweeted in response to CNN’s DJ Judd who reported protesters yelled, “Marriage is between a man and a woman!” and “repent!”

BARNEY FRANK PRAISES BUTTIGIEG, SAYS O'ROURKE MAY BE 'REGRETTING THAT HE'S STRAIGHT'

“Texans don’t stand for this kind of homophobia and hatred,” O’Rourke wrote. “Mayor Pete, we are grateful you came to Texas and hope to see you and Chasten [Buttigieg’s husband] back again soon.”

At a campaign event in Iowa last month, Buttigieg was confronted by protesters who told him, “Remember Sodom and Gomorrah!”

CLICK HERE TO GET THE FOX NEWS APP

“The good news is, the condition of my soul is in the hands of God, but the Iowa caucuses are up to you,” Buttigieg said in response to the hecklers.

According to The New York Times, 21 Democrats are running for president in 2020. Buttigieg officially announced he was running in April.