Even with the support of the far right, his Popular Party (PP) has fallen short of a majority in parliament.
The cheers at the rival Socialist camp were just as loud as Socialist Prime Minister Pedro Sánchez declared: “The reactionary bloc has failed.”
While both can claim success, Spain is left with an inconclusive result.
But Mr Sánchez has been vindicated in his controversial decision to call the vote in the searing heat of a Spanish summer, when election-day temperatures reached 40C in some parts of the country.
Turnout topped 70%, as voters sensed the importance of the election, breaking off from their holidays to vote in swimwear and with beach gear in tow.
“No pasarán,” supporters chanted outside Socialist HQ – they shall not pass – referring both to far-right party Vox and the anti-fascist slogan of the Spanish civil war.
Nonetheless, Mr Feijóo told cheering conservative supporters that it was now his duty to try to form a government.
“Spaniards know we have gone from being the second force to the party with the most votes,” he said, adding: “I hope this doesn’t start a period of uncertainty in Spain.”
But that is what Spain is facing. Because with Vox on 33 seats and Mr Feijóo’s PP on 136, they would be seven seats short of an absolute majority of 176 in parliament, so the most likely result of this election is another poll towards the end of the year.
That is why Mr Sánchez’s Socialists and his far-left allies Sumar appeared happiest.
“The reactionary bloc of regression, which set out a complete reversal of all the advances that we’ve achieved over the past four years, has failed,” he told supporters.
The right has repeatedly attacked Mr Sánchez because of a badly framed law on sexual consent, as well as reforms on abortion and transgender rights.
But the opposition also targeted the support he received from Catalan and Basque nationalists, arguing that concessions he made to them threatened Spain’s territorial unity.
Some PP supporters outside party HQ chanted Que te vote Txapote, an anti-Sánchez slogan meaning “Let Txapote vote for you”, which referenced a militant who carried out killings for the defunct Basque group Eta.
For much of the night the mood among PP supporters had been subdued and celebrations finally picked up when their party overtook the Socialists in the results. As their leader finished his speech, little groups of voters draped in Spanish flags asked each other what would happen next.
These were not victorious activists celebrating. Despite the rhetoric from the balcony above, this felt like an empty win.
One Spanish website, El Español, said that despite the PP’s victory, Pedro Sánchez still had a chance of forming a government.
But those very slim chances would require going even further than before in securing separatist support. He would also need the backing of a hardline pro-independence party, Together for Catalonia (Junts), which appears unwilling to support him.
The 70% turnout was higher than in November 2019, despite the summer heat. That was partly due to almost 2.5 million postal votes being cast, but polling stations were busiest in the morning before the heat took hold.
Vox remains the third biggest party, with the support of three million of Spain’s 37 million voters, but not significantly ahead of Sumar and with a big drop in seat numbers.