FIFA's president Sepp Blatter has apologized for joking about Qatar's laws against gay sex.

When asked what he advised gay fans attending the 2022 World Cup tournament in Qatar, a mainly Muslim country which forbids gay and lesbian relationships, Blatter responded with a joke.

After a long pause, Blatter answered: “I would say that they should refrain from sexual activities.”

But on Friday, Blatter apologized for the joke, the AP reported.

“It was not my intention and never will be my intention to go into any discrimination,” Blatter told reporters in Abu Dhabi. “This is exactly what we are against. If somebody feels that they have been hurt then I regret [it] and present apologies.”

Former NBA basketball star John Amaechi was among those who criticized Blatter.

Writing at his blog, Amaechi, who came out gay in 2007, said that FIFA “has endorsed the marginalization of LGBT people around the world.”

“Blatter's words aren't really about sex, as I can't imagine that many gay football fans would be bold enough to do it in public in Qatar,” Amaechi wrote. “Rather, what he is really saying is 'Don't be camp, don't hold hands, don't look into each other's eyes, don't book rooms with one bed, don't have candle-lit dinners in the restaurant …' and on and on.”

“He's really saying don't even 'look' gay, re-closet yourself and pretend the ties and love and affection you have for your partner or even a random bloke you might meet on your travels are gone for the whole time you are in Qatar.”