Matteo Salvini, Italy’s most powerful politician, has said Europe will become an “Islamic caliphate” unless nationalist parties make gains in the European elections later this month.

Salvini, Italy’s deputy prime minister and leader of the League party, is trying to form a coalition of nationalist and far-right forces ahead of the elections and was speaking in Budapest during a visit to his ideological soulmate Viktor Orbán, the Hungarian prime minister.

“For our children, to leave behind an Islamic caliphate with sharia law in our cities is not something I want to do and I’m going to do everything in my power to avert this sad ending for Europe,” he said at a joint press conference with Orbán, who has used similarly incendiary rhetoric to rail against migration to Europe from Africa and the Middle East. Salvini made similar comments earlier this week in Italy.

Earlier on Thursday, Orbán took Salvini by helicopter to visit the fence his government has built along Hungary’s southern border with Serbia. They strolled between the barbed wire fortifications and chatted with guards. Later, the pair met for talks in Orbán’s new office at Buda Castle in central Budapest.

Orbán, who is in his third term as prime minister and has based his political platform on promoting nationalism and rejecting migration, has become a favoured figure of far-right politicians from across the continent and beyond.

On Monday, he will receive Heinz-Christian Strache, Austria’s vice-chancellor and the head of its far-right Freedom party, and on 13 May he is due in Washington for a first meeting with Donald Trump at the White House. Orbán’s spokesman announced the visit on Thursday.

Polls suggest far-right and nationalist parties could gain about a quarter of the seats in the European parliament, but it remains an open question what kind of alliances they will form. Orbán’s Fidesz party is still a member of the European People’s party (EPP), a centre-right bloc, but has been suspended amid concerns over the rule of law in Hungary. Fidesz may join Salvini and France’s Marine Le Pen in a new bloc.

“We will be seeking cooperation openly and visibly. How we will do that and in what format we’ll have to see,” said Orbán on the possibility of future cooperation with Salvini.

Fidesz, which dominates the Hungarian political scene, is on course to win more than half the vote in the European elections, according to a number of polls. A poll on voting intentions in Italy this week gave Salvini’s League about 32% of the vote.

Ágoston Sámuel Mráz, the head of the pro-government Nézöpont thinktank in Budapest, said that before the elections Orbán was unlikely to say formally he would join Salvini’s bloc, but “will leave the idea floating in the air” and wait to see what happens afterwards.

“There will be some time where everyone is doing the mathematics, and then there will be a lot of manoeuvring,” said Mráz.

In 2015, hundreds of thousands of migrants and refugees crossed Hungary on the way to western Europe, and Orbán ordered construction of the border fence. Since then, asylum applications can only be made by a small number of people in specially created border transit zones, where the Hungarian government has been accused by rights groups of using starvation tactics to force out those who fail in their claims.

Salvini expressed his admiration for the border fence, claiming it was not meant to deter “real refugees” but economic migrants and terrorists. “We are stopping people entering Hungary and Italy who are not fleeing war. They want to bring the war here,” he said.

One bone of contention between the two far-right leaders is on the issue of how to manage migrants already in Europe. Salvini is in favour of a European redistribution quota, while Orbán’s government has vehemently opposed such a move. On Thursday, Salvini appeared to agree with Orbán and called for forced repatriation of failed asylum seekers already in Italy. “My role is not to send 20 to Budapest, 30 to Lisbon and 40 to Helsinki. I want somebody to wake up in Brussels and deal with repatriation in large numbers,” he said.