Spain’s conservative People’s Party won the most seats in Sunday’s snap election and has enough votes in parliament to form a government with far-right Vox if the two parties reach a deal. With almost all ballots counted, the People’s Party won 132 seats and Vox won 52, giving them 184 between them. That’s eight more than the 176 needed for a majority in Spain’s lower house. Overseas ballots were still pending. Provisional results

Pedro Sánchez’s Socialists finished second with 116 seats. On Monday, Sánchez resigned as party leader and said he wouldn’t take the parliamentary seat he won in Madrid. He remains caretaker prime minister while the next government is formed. Sánchez called the early election after failing to get housing measures through parliament.

Sánchez repeatedly clashed with President Trump. He pushed back on Trump’s demand that Spain spend 5% of its GDP on NATO-related defense and security, and his government refused to let U.S. aircraft use Spanish bases for the war in Iran. Trump welcomed Sánchez’s defeat, calling it “great news.”

The People’s Party lost five seats compared with 2023. It was Vox’s 19-seat gain that put the two parties over the majority line. No coalition agreement has been announced. Vox leader Santiago Abascal declined Monday to say what form a deal might take. Under Spain’s constitution, the king consults party representatives and nominates a candidate, who must then win a vote in Congress.