The first Major League Soccer player who ever took the field as an openly gay man was surprised to learn that Real Salt Lake coach Mike Petke reportedly shouted an anti-gay slur at game officials.

Robbie Rogers, who retired from the Los Angeles Galaxy in 2017, said he hasn’t followed the Petke incident closely, but that he’s “sort of shocked” that the coach — “the leader of the guys in the locker room and the face of the club right now” — would resort to a homophobic slur. Even in the heat of the moment after a close loss.

“I understand. I’ve said awful things on the field, too,” he said. “But it’s 2019. And this is more than just saying awful things.”

Rogers said the use of anti-gay slurs “really scars” LGBTQ kids when they hear them at games. “They think — they’re talking about me. Or they think it’s OK to say that,” Rogers said. “It definitely scarred me.”

Los Angeles Galaxy midfielder Robbie Rogers, left, jumps over Seattle Sounders midfielder Micheal Azira during the second half of an MLS soccer playoff game, Sunday, Nov. 23, 2014, in Carson, Calif. The Galaxy won 1-0. (AP Photo/Mark J. Terrill)

MLS suspended Petke for three games and fined him $25,000 after he shouted at officials following a 1-0 loss to Tigres UANL in Leagues Cup competition at Rio Tinto Stadium on July 24. He was also suspended for three future Leagues Cup games, and RSL suspended him for two weeks without pay; ordered him to have no contact with the team during that time; and ordered him attend anger management training.

“There is absolutely no place for this type of behavior in our society, and Major League Soccer does not tolerate the repugnant language used by Mr. Petke,” MLS Commissioner Don Garber said in a statement.

Petke is expected to be back to work next Monday, when his suspension comes to an end.

Neither the league nor RSL has specified exactly what Petke said, but multiple outlets — including The Athletic — have reported that the coach shouted a Spanish-language, anti-gay slur at the official. And that would account for the harsh penalties levied against Petke by a league — more harsh than just using R-rated language.

(In 2013, MLS suspended a San Jose player, Alan Gordon, for three games for using a homophobic slur.)

And that’s appropriate, said Rogers, who’s now a producer of The CW series “All American.”

“They have to be a bit harsher with" homophobic slurs, he said. “And they have to be a bit harsher, I think, with the fans. They have to try to stop that kind of stuff.”

Rogers pointed to the fact that MLS clubs have held gay pride nights and supported the LGBTQ community. Including Real Salt Lake.

“I think they're very supportive, actually,” he said. “I mean, they have crazy fans but they're amazing and passionate. I did not expect this from their coach.”

In 2018, FIFA fined Mexico’s soccer federation $30,000 because Mexican fans shouted the same anti-gay slur at a World Cup game, and the coach and players took to social media to try to stop it from happening again. However, CONCACAF took no action against the Mexicans when fans shouted the same slur repeatedly at Gold Cup games earlier this summer.