By Krisztina Than

BUDAPEST (Reuters) - Prime Minister Viktor Orban told a huge rally on Thursday that in elections next month Hungarians must fight "external forces and international powers" who want mass immigration into their country.

The 54-year-old, seeking a third consecutive term and campaigning on an anti-immigration agenda, said the April 8 vote was the "greatest battle" faced so far by the tens of thousands of his supporters waving national flags in front of parliament.

"External forces and international powers want to force all this (immigration) on us ... with the help of their henchmen here in Hungary, and they see the coming election as a good opportunity for this."

Many of the million irregular migrants from the Middle East, Asia and Africa who trekked across southeast Europe in 2015 passed through Hungary. It has responded with a border fence and strong opposition to EU proposals to settle migrants in member status under a quota system.

"Those who do not stop immigration at their borders will be lost," Orban said.

"STRANGERS"

"They (external powers) want to take our country ... they want to force us to give it up voluntarily over a few decades to strangers arriving from other continents who do not ... respect our culture, our laws and our way of life."

Orban's supporters were joined by thousands of supporters of Poland's ruling conservative PiS party - another administration at odds with Brussels over migration and over Warsaw's efforts to tighten controls over courts and media.

Orban said Hungary and Poland were like two ancient trees with entangled roots.

"If Poland is strong, Hungary cannot be lost either," he said adding that the rally was also a demonstration of support for Poland.

He said Hungary had been joined by Poland, Slovakia, the Czech Republic, the United States, Austria and Italy in opposition to immigration.

Orban said Hungarian opposition parties were backed by a network which included media financed by foreign companies, domestic oligarchs and NGOs funded by international speculators.

Story continues

Supporters of Orban's Fidesz party carried banners with the slogans "Hungary protects Europe" and "We are with you Viktor".

"He (Viktor Orban) is not afraid of EU's big powers and dares to swim against the current," said Imre Csordas, 51, wearing 16th-century Hungarian costume. "He stands up for the interests of Hungarians."

Organizers brought people into the capital from the countryside in fleets of buses for the rally and march, which coincided with a national holiday commemorating Hungary's 1848 revolution.

LEADING THE POLLS

Orban's party suffered an unexpected setback in a recent municipal by-election, but remains well ahead of its rivals in opinion polls despite media reports that revealed the luxurious lifestyles of some Fidesz politicians and a murky investment deal involving one this week.

Opposition parties also held rallies in Budapest during the day.

Thousands attended an alternative Peace March led by the Two-Tailed Dog Party, a spoof movement. Some carried banners reading "down with freedom, up with the government", "more money for football" or demanding "freedom of censorship and the abolition of the press".

Jobbik, a former far-right party which now positions itself more toward the center, is the strongest opposition party and bitterly critical of Orban.

"Our freedom is under threat from oppression by a man obsessed with power ... as if we were sliding back into communism step by step," its leader Gabor Vona told a crowd of 1,500 people.

Vona said his party would strengthen border security forces, reinstate "real democracy" with independent institutions and try to stop the emigration of Hungarians to work in richer western Europe.

(Additional reporting by Marton Dunai; Editing by Andrew Roche)