The country had been a holdout from a trend already sweeping other parts of Europe and beyond. Now the right-wing Vox party shares power in Spain's largest region.
It is the latest sign that many citizens are drawn to a populist movement that is reshaping politics in Germany by focusing debate squarely on immigration.