South Africa has barred Pastor Steven Anderson from visiting the nation.

Malusi Gigaba, South Africa's home affairs minister, said that the government denied visas to Anderson and members of the Faithful Word Baptist Church in Tempe, Arizona because they promote hate speech and “social violence.”

Anderson had been invited by a local church to host a “soul-winning marathon” in Johannesburg on Sunday.

Anderson gained national headlines in 2014 when he posted video of a sermon he gave in which he claimed to have discovered “the cure for AIDS.”

“[W]e can have an AIDS-free world by Christmas,” he said. “Because if you execute the homos like God recommends, you wouldn't have all this AIDS running rampant.”

More recently, Anderson cheered the June mass shooting in an Orlando gay nightclub that left 49 people dead and wounded dozens.

“The good news is that at least fifty of these pedophiles are not going to be harming children anymore. The bad news is that a lot of the homos in the bar are still alive, so they’re going to continue to molest children and recruit people into their filthy homosexual lifestyle,” he said.

(Related: Anti-gay pastor Steven Anderson prays for God to rip out Caitlyn Jenner's heart.)

Anderson criticized the decision in a Facebook post, adding that he still plans to attend a September 25 event in Botswana.

“I feel sorry for people who live in South Africa, but thank God we sill have a wide open door in Botswana,” he wrote. “Stand by for reports of MULTITUDES saved in Botswana, where religious freedom still exists.”

LGBT activists who had urged the government to act cheered the news.

“We've seen how U.S. religious extremists have fueled violence and hate against LGBT people in other parts of Africa,” Matt Beard, executive director of All Out, said in a statement. “It's inspiring to see that the South African Government has made a stand for human rights and for the protection of their hate speech laws and constitution.”