“Illegal migration is a problem for the whole of Spain,” said Juan Francisco Rojas, the president of Vox in Almería, where about 14,000 migrants arrived from Africa last year as the populist government in Italy tightened its borders.

As for Catalan secessionism, he said, “Anything that affects one part of our territory also impacts the rest of Spain, which is why Vox wants to guarantee nobody can threaten our unity.”

While much of the country favors a hard line toward Catalonia, Spain has been relatively tolerant on the issue of migration.

Just how far Vox’s message will carry beyond the coastal south, then, is unclear. But the party’s emergence in a country with a long chapter of dictatorship under Francisco Franco has unsettled many.

Santiago Abascal, the founder of Vox, has quickly found like-minded company in Europe, joining the French nationalist Marine Le Pen on her presidential campaign in 2017. Vox has also sought advice from Stephen K. Bannon, the former chief strategist of President Trump.

In fact, the party also wants to follow Mr. Trump’s example and erect walls around two Spanish enclaves in North Africa, to block migrants.

“If you look at Trump in America or Bolsonaro in Brazil, you see that people now want politicians who are tough enough to do what they promise,” said Juan Carlos Perez Carreño, the owner of a fleet of refrigerated trucks that transport produce picked in the greenhouses, referring to Jair Bolsonaro, the right-wing leader of Brazil.