Hungarian prime minister Viktor Orban (Reuters)
Hungarian Prime Minister Viktor Orban has hit back at John McCain's accusations of facismReuters

Hungarian Prime Minister Viktor Orban has hit back after US senator John McCain branded him a fascist, claiming that the country's independence was "under attack".

Speaking on public radio, Orban called McCain an "extremist" and said that the comments "reflect the person who said them".

On Tuesday, Republican senator and former presidential candidate McCain criticised the appointment of Hollywood producer Colleen Bell as new US ambassador in Budapest.

Hungary, he said, "is on the verge of ceding its sovereignty to a neo-fascist dictator getting in bed with Vladimir Putin, and we're going to send the producer of The Bold and The Beautiful as the ambassador."

The US has barred six Hungarian officials from entry over corruption allegations.

Western officials have criticised Orban for weakening the independence of the country's judiciary, press freedoms and democratic checks and balances, and attempting to forge closer economic ties with Russia.

The Hungarian Foreign Ministry summoned the top US diplomat in the country following McCain's remarks.

In his speech on Friday, Orban pledged to safeguard the country's national sovereignty.

"Hungary's independence is under threat here," he said, reports Hungary Today.

He said "the country's independence in terms of energy, finances and trade relations is unappealing to those who profited from Hungary's dependence prior to 2010″.

Orban has tried to forge closer economic ties with Moscow, which has drawn criticism from Washington and Brussels.

Officials argue that Hungary, an EU member, shouldn't be making energy deals with Putin, who they accuse of backing separatist rebels in east Ukraine who are battling government forces, after a popular uprising saw Ukraine's pro-Moscow government toppled.

Budapest is also in negotiations with Russian company Rosatom over a multi-billion dollar nuclear energy deal.

In yesterday's speech, Orban blamed the EU for the cancellation of the South Stream project, that would have seen gas pumped from Russia under the Black Sea and into central Europe, bypassing Ukraine.

He added that the "the file on the South Stream gas pipeline is now closed" but Hungary's interest has remained "to have a gas pipeline that arrives in Hungary avoiding Ukraine".

He said that he "would not be a viceroy in Hungary commissioned by some foreign state".