LONDON (AP) — Labour Party leader Jeremy Corbyn lost Britain's election, but his beaming smile and enthusiastic thumbs' up the morning after was the demeanor of a man who knew he was nevertheless the winner.
The party piled on votes and gained more than 20 new seats in Thursday's election. It fell short of victory, but managed to frustrate Prime Minister Theresa May's hopes of a landslide that would strengthen her position in negotiating Britain's exit from the European Union.
The success marked a huge turnaround for Labour and its uncompromisingly left-wing leader, who were given up for dead when the campaign began.
The gap narrowed over the seven-week election as May was criticized for a lackluster campaign amid a series of missteps, most importantly a proposal to force elderly people to pay for more of their care. Corbyn, 68, capitalized with promises to soften Brexit and proposals to boost spending after seven years of austerity.
"This was looking like the Blitzkrieg: it was going to be all over in a few weeks and Mrs. May was going to be victorious," said Ben Page, chief executive of pollster Ipsos MORI. "But instead, Jeremy Corbyn and the Labour Party have put up much more of a fight than anybody was anticipating."
Pre-election expectations were also upset by two terror attacks in as many weeks that killed 30 people in Manchester and London, twice forced the suspension of campaigning and focused attention on the Conservatives' record on security.
May called the early election in hopes of extending a slim majority in Parliament as opinion polls showed the Conservatives had a wide lead over Labour. Instead, May's majority evaporated and she was left with just 318 of the 650 seats. Labour has 262.
While May portrayed Corbyn as untrustworthy and out of touch with average voters, Labour painted the Conservatives as the party of the rich and special interests. Labour's pitch was summed up in the slogan "For the many, not the few."
That translated into proposals to raise taxes on corporations and the wealthy, while increasing funding for schools and the National Health Service. Labour appealed directly to young people by promising to scrap university tuition fees and suggesting it might cancel debts run up by recent graduates. The party also said railroads, water companies and the Royal Mail should be returned to public ownership.
Turnout figures by age have not yet been released, but Ipsos MORI said 77 percent of people 24 and younger planned to vote in this election, compared with 55 percent during the last election two years ago.
Young people have borne the brunt of austerity measures embraced by Conservative-led governments since 2010, said Tim Bale of Queen Mary University of London.
"They're worried about housing, tuition fees, the gig economy, stable jobs — it's no surprise they are fed up," he said.
By contrast, May built her campaign on the idea that she could provide the "strong and stable leadership" needed to negotiate Britain's divorce from the EU. Her support dropped after the Conservatives said people's homes should be included in the assets used to pay for their care in old age, something opponents described as a "dementia tax."
Corbyn has had troubles of his own building party unity. He ignored a vote of no confidence in him by Labour lawmakers last year and had difficulty filling his top parliamentary team, surrounding himself with lawmakers who share his left-wing views rather than the centrist policies that former Prime Minister Tony Blair used to win three elections.
But those battles also helped Corbyn learn how to campaign before a national audience. In the process, he forged an image that Bale describes as "eccentric uncle-slash-grandfather."
"He is authentic where (May) is robotic," Bale said. "That clearly doesn't help the Conservatives."
It was unorthodox, but it worked. By the end of the campaign he was addressing rallies of thousands of boisterous, and largely young, supporters and getting endorsements from well-known actors, rock stars and grime musicians.
Victoria Honeyman, an expert on Labour at the University of Leeds, cautioned that despite the Corbyn surge, many still don't see him as a potential prime minister.
Nowhere was this more obvious than the issue of nuclear weapons. While Labour supports maintaining a nuclear deterrent, Corbyn has in the past voted against funding for Britain's Trident missile system.
That question came up during the campaign in a town hall-style question-and-answer session during which audience members heckled Corbyn when he refused to give a definitive answer about whether he would launch a retaliatory nuclear strike.
One audience member asked if he would "allow North Korea or some idiot in Iran to bomb us and then say, 'We'd better start talking.'"
"Of course not," Corbyn deadpanned.
Honeyman said Corbyn gives some voters "the impression that he wouldn't necessarily do the right thing for Britain."
But the exchange underscored just the sort of thing that supporters love about Corbyn: the uncompromising way he sticks to his principles.
For all of Labour's unexpected strength, much of the post-election focus is on the prime minister's weakness.
"What happened is that Mrs. May has fought one of the worst election campaigns in living memory," Page said. "It will be studied for the next 50 years."
And Corbyn's critics inside the party remained unconvinced by his leadership.
Chris Leslie, a lawmaker on the right of the party, called the election result "OK" but pointed out that Labour had still lost.
"We shouldn't pretend that this is a famous victory," he said. "It is good as far as it's gone but it's not going to be good enough."
Jill Lawless contributed to this story.