Steven Anderson has been banned from 31 countries. (YouTube)

The South African government has banned ‘undesirable’ US preacher Steven Anderson from entering the country.

Pastor Steven Anderson of the Faithful Word Baptist Church in Phoenix is one of America’s most homophobic pastors.

In a previous sermon he directly called for the execution of gay people by stoning, claiming: “If a man also lie with mankind, as he lieth with a woman, both of them have committed an abomination: they shall surely be put to death. Their blood shall be upon them. That, my friends, is the cure for AIDS. It was right there in the Bible all along.”

He openly celebrated the Orlando massacre last month, telling his congregation: “The good news is that there’s 50 less paedophiles in this world, because, you know, these homosexuals are a bunch of disgusting perverts and paedophiles.

“That’s who was a victim here… just a disgusting homosexuals at a gay bar.”

Praising the actions of the shooter, he said: “There is a full-on war going on! A bunch of filthy sodomite perverts are at war with us!”

The pastor planned to head to South Africa this month to convert more people to his extreme cause.

However, the country’s Minister of Home Affairs, Malusi Gigaba, confirmed the pastor would be banned from entering after a public campaign to block the visit.

Mr Gigaba cited laws that ban “foreigners likely to promote hate speech or advocate violence”, accusing Mr Anderson of being “unwilling to respect our constitutional protections against hatred and discrimination”.

He added: “I have considered carefully the merits of this matter… we have a duty to prevent harm and hatred in all forms. Against the LGBTI is against any other person in a democratic state.

“Steven Anderson and members/associates of his church are prohibited from entering the Republic of South Africa. I have identified [Anderson and associates] as undesirable persons. Undesirable persons are barred from travelling to South Africa.

“Accordingly, Steven Anderson will be advised he is prohibited from entering South Africa.”