The chief of staff for Hungary’s prime minister has slammed Facebook after a video he posted on the site was 'banned'.

Facebook overturned its decision on Wednesday after Janos Lazar blasted the tech giant. The company said it made an exception to its usual ban on hate speech, but did not elaborate on why.

Lazar was being filmed during a visit to Vienna when he made controversial comments about immigrants living in the city.

“Vienna has become a worse place because of the refugees,” he says in the video, which was published Tuesday on his Facebook page.

"Evidently the streets are dirtier, evidently the area is poorer and there’s lots more crime,” he continues while walking though the Favoriten district. The quarter has the fourth highest foreign population in the city according to official figures, although most Viennese residents with a foreign background come from Serbia, Turkey and Germany.

He goes on to say that Hungarian cities would also deteriorate should opposition parties win national elections in April and “let in the migrants”.

"The white Christian Austrians have moved out already from this part of the city, and the immigrants have taken control," says the former Fidesz party leader .

Lazar shared a screenshot of a message from Facebook, which reads: “We remove all the posts which attack people because of their race, ethnicity, nationality or religion, sexual interest, gender or disability."

The video was later deleted by Facebook because it broke community guidelines, according to a screenshot Lazar shared on his Facebook page.

“This move hurts freedom of speech and the free deliverance of opinions,” he wrote on Wednesday morning. “So I ask the administrators of Facebook with this present post to make the video available again.”

Despite Lazar’s comments about the city, Vienna has topped quality of life surveys for eight years in a row.

In 2017, it surpassed 230 other cities worldwide to reach number one on Mercer’s list, while Budapest ranked 78th.

Vienna's vice mayor Dominik Nepp dismissed Lazar's remarks, saying they were "unreasonable and not exactly an act of courtesy in the sense of friendly relations between neighbouring countries."

Hungarian Prime Minister Victor Orban, has also faced fierce criticism in recent weeks over disparaging comments he made about foreigners.

UN human rights chief Zeid Ra’ad al-Hussein called Orban a racist and xenophobe last month after he said Hungarians didn’t want their “own colour, traditions and national culture to be mixed by others.”