Hungarian Prime Minister Viktor Orban and newly elected opposition leader Peter Marki-Zay held separate rallies in Budapest on Saturday six months from an election expected to be the tightest race in 15 years.

Several tens of thousands of Orban supporters marched through the Hungarian capital to hear a speech by the nationalist premier on a national day commemorating Hungary's failed anti-Soviet uprising in 1956.

Taking aim at the European Union Orban compared its treatment of Hungary and ally Poland during recent clashes over rule-of-law issues to Soviet-era hostility.

The "EU speaks and behaves to us as and the Poles as if we were enemies", he said.

"Brussels would do well to understand that even the communists could not handle us. We're the David who Goliath is better off avoiding," he said.

Orban has also taken Warsaw's side in its row with Brussels over the reach of Polish courts, while both countries have pledged to veto any EU moves to punish the other.

Several march participants, including many who travelled from Poland, carried Polish flags while one held a placard reading "Brussels = dictatorship".

At Hungary's parliamentary vote expected to be held next April Orban, 58, will face Marki-Zay, a 49-year-old conservative provincial mayor, who won an opposition primary election last Sunday.

People supporting the government of Hungary's Prime Minister Viktor Orban march in Budapest
People supporting the government of Hungary's Prime Minister Viktor Orban march in Budapest AFP / Peter Kohalmi

The primary, Hungary's first ever, was organised by a six-party opposition alliance formed last year in an effort to combat the mainly first-past-the-post election system that favours Orban and his ruling right-wing Fidesz party.

Warning the crowd about the return of "the left" to power Orban said that "there is only one left no matter how many ways they disguise themselves", a reference to the diverse range of parties in the opposition alliance.

After three landslide wins since 2010, polls predict that Orban will face his closest contest since he last lost a general election in 2006.

Opinion polls have put the opposition alliance neck-and-neck with Fidesz.

Orban also hinted that he suspects likely interference in the looming Hungarian election by outside powers and liberal US billionaire George Soros.

"Somewhere on the other shore, Uncle Georgie is getting ready," said Orban who has long waged media campaigns against the Hungarian-born Soros.

"When we could have really used their help (as in 1956) they did not come. Now, when we haven't called them, they are here," he said, a reference to calls for western help by Hungary during the uprising.

Around 5,000 opposition supporters gathered later at a separate rally where Marki-Zay said that "people had enough in 1956 and they have enough (of Orban) now".

The practising Catholic and father-of-seven said Hungarians were tired of Orban's "hate campaigns" such as anti-immigration and anti-LGBTQ drives.