MADRID — Conservative and far-right parties are on course to secure a convincing victory in Sunday’s national election and end Pedro Sánchez’s eight-year tenure as Spain’s prime minister. With 90 per cent of votes counted, the conservative Popular Party and the far-right Vox party are closing in on a combined total well over the threshold of 176 seats needed to form a government. The Popular Party, or PP, declared victory on X, saying, “The PP is going to win the elections and Alberto Núñez Feijóo is going to be Prime Minister of Spain.” A large crowd of supporters gathered in front of its party headquarters in Madrid, waving both the party’s and Spain’s flag. The victory would return the PP to power for the first time since 2018 along with junior partner Vox. That would make the incoming administration the first to feature a far-right, nationalist party in power for the first time since dictator Francisco Franco’s death in 1975. U.S. President Donald Trump on Sunday welcomed the defeat, saying it was “great news” that Sánchez was on track to be unseated. “That’s a good thing,” Trump told reporters in Washington. “He did a terrible job. He deserves to lose.” Sanchez has been one of Trump’s loudest critics in Europe and the two have frequently clashed over topics including the Iran war, Venezuela and NATO spending. PP leader Feijóo would become Spain’s next prime minister as long as PP and Vox can agree, as is widely expected, to form a coalition when the new parliament meets next month to vote in a government. The election is seen as a referendum on Sánchez. The left-wing leader of the Socialist party has governed Spain for eight years through numerous crises, but also a period of economic growth that, for many voters, has been eclipsed by cost-of-living concerns. No issue has galvanized Spaniards in recent years quite like access to affordable housing. Soaring home and rental costs in cities and tourism hot spots have caused widespread discontent, especially among the young. Sánchez announced an early election after right-wing parties in parliament voted down measures that his government introduced to alleviate housing pressures. Nationwide protests sprang up after the dramatic eviction of an 87-year-old woman from her apartment in Madrid. Sánchez has warned voters that a conservative government wouldn’t make their lives more affordable, and frequently has said that his opponents would take the country of 50 million backward. Sánchez’s opponents heavily scrutinize his record Feijóo promised voters more stability and better governance, frequently pointing to to the many crises that took place under Sánchez. He has criticized Sánchez’s record not just for his government’s failure to improve Spaniards’ housing woes, but also for two fatal train crashes this year on Spain’s high-speed rail network, a nationwide blackout in April 2025 and a border crisis in Spain’s North African exclave of Ceuta. Feijóo also pilloried Sánchez — who relied on backing from far-left and separatist parties to cling to power in 2023 — for not being able to pass a budget in nearly four years, lacking parliamentary support. “I ask Spaniards not to vote with fear, but with memory,” Feijóo said in Madrid after casting his ballot. “Today is a day when the Spanish people take the helm and will decide the future, the destiny, and the direction of Spain.” Europe is closely watching the vote Spain has welcomed millions of people, mainly from Latin America, but also from Africa and elsewhere in Europe. One in five residents was born outside Spain, according to census data. Earlier this year, the Spanish government legalized the status of nearly 1.2 million immigrants living in the country without authorization. Feijóo and Abascal have portrayed Sánchez’s immigration-friendly policies as harmful to ordinary Spaniards, pointing to the country’s insufficient housing stock and strained public services. Both candidates have condemned the migrant legalization measure. The result will also be closely watched across Europe before an election-packed 2027, in which voters will head to the polls in France, Italy, Greece and Poland. In France, the far-right National Rally is aiming to take power, while in Italy, Premier Giorgia Meloni’s right-wing coalition is expected to seek another term. Late Sunday, Meloni congratulated the PP and Vox for their victory, writing on X that she looked forward to working with them “for the benefit of our nations.” 39 million people are eligible to vote About 39 million people are eligible to cast ballots. Voting generally takes place in schools, community centres, town halls and other municipal facilities. Spaniards can also vote by mail. A Spanish prime minister will be elected by the new parliament resulting from a vote that will be convened next month. A candidate needs the support of an absolute majority — or at least 176 lawmakers — in the first parliamentary vote, often relying on coalition agreements or support from other parties. Sánchez became a star of the global left, opposing Trump and Israel Sánchez, a Madrid native and former economics professor, became a hero to the global left for his government’s opposition to the Israel-Hamas war in Gaza, and his resistance to U.S. President Donald Trump. He has criticized the U.S. and Israel over the Iran war, and was one of Western Europe’s first major leaders to formally recognize Palestinian statehood. Sánchez’s government has turbocharged Spain’s climate commitments, pledging to source all its energy from renewable sources by 2050. The country already generates more than half its electricity from noncarbon sources. But his critics say that his overreliance on renewables was responsible for the 2025 blackout. He’s the first Spanish prime minister to speak comfortably in English. Sánchez’s party, including members of his inner circle, has been dogged by legal cases involving corruption. The cases have implicated a former minister and top officials, eroding voters’ trust. Feijóo, in contrast, is a lifelong civil servant-turned-politician from rural northwestern Galicia who doesn’t speak English and projects himself as a sensible, moderate and effective administrator. Feijóo governed the region of 2.7 million people for 13 years. He is expected to mend bridges with the United States and Israel if he wins. Suman Naishadham, The Associated Press Joseph Wilson contributed to this report from Barcelona, Spain.