He likened their electoral victory to the Hungarian revolution of 1848 and the uprising against Soviet occupation in 1956.

There was a time when Orbán himself spoke out against Soviet occupation, but he has become a close partner of Putin, and his justification of cheap Russian oil and petrol has made him a highly unpopular leader in the EU, which has tried to shake its reliance on Russian imports. Orbán has also reneged on an EU agreement to provide Ukraine with a €90bn (£79bn; $105bn) loan.

“Russians go home,” Magyar supporters chanted, as the next Hungarian prime minister promised better relations with the EU.

Poland’s Prime Minister Donald Tusk was among the first of many European leaders to welcome Magyar’s “glorious victory”, adding in Hungarian “Ruszkik Haza” – Russians go home.

The Tisza leader pledged that his first trip abroad as prime minister would be to Warsaw – to reinforce Hungary’s 1,000-year friendship with Poland.

He has also promised to travel to Brussels, where he aims to persuade the European Commission to unlock as much as €17bn in funds frozen over failures to tackle corruption and maintain independence in the judiciary.

Magyar has momentum after a marathon campaign that took in up to seven speeches a day and energised big crowds across the country.

His defeated rival sounded tired and jaded in his final campaign speech on Saturday night, as if he knew what was coming.

Orbán, now 62, has not resigned as party leader, and without him it is difficult to imagine what will happen to Fidesz.

For now he will continue to lead Hungary in a caretaker role, while he and his party lick their wounds.

Additional reporting in Budapest by Rita Palfi