Labour leader Jeremy Corbyn is mobbed by young supporters after addressing an anti-austerity rally in Parliament Square, London, following a march through the city on July 1.

Less than two months ago, U.K. Labour Party leader Jeremy Corbyn was way behind in the polls when he took the stage at a music festival in Liverpool.

With his shirt untucked, Corbyn, 68, introduced the indy rock band the Libertines and delivered an impassioned defense of public funding for the arts before a crowd of some 20,000, most of them youngsters.

He urged them to demand "a government that cares about sport, culture and the arts — and gives you the space to play and rehearse your music!"

The audience began to chant, "Oh, Jeremy Corbyn" to the tune of "Seven Nation Army" by the White Stripes.

For the next six weeks, the same chants spread to soccer games, nightclubs and universities — as Corbyn's popularity soared among youth angry about student debt, income inequality and Britain's upcoming exit from the European Union.

There's even a new video game called Corbyn Run, in which a Corbyn avatar takes money from bankers and redistributes it to the people, while dodging Conservative Prime Minister "Theresa Mayhem."

Corbyn's unexpected surge in popularity among young voters upended last month's general election. Prime Minister Theresa May called the election early, encouraged by polls that suggested she would increase her majority in Parliament. Instead, her missteps, and Corybn's success, left May barely clinging to power.

"From a very, very low starting point, Jeremy Corbyn's secured 40 percent of the popular vote, which is the largest swing to the Labour Party since the Second World War," says Emma Rees, the national coordinator for Momentum, a pro-Corbyn faction within the Labour Party.

Two years ago, that party was in disarray. It had just lost yet another general election under then-leader Ed Miliband, who resigned afterward. Corbyn, a member of Parliament for 32 years at that point, won the party leadership contest in a landslide, after rules were changed to allow many more people to register as party members and vote for a leader.

But while Corbyn had strong support among grassroots activists, many members of Parliament from his own party said he was too far-left to ever be elected as prime minister. They opposed his plans for tax hikes and more public spending, not to mention his praise for the likes of the late Venezuelan leader Hugo Chavez.

Corbyn's plans to nationalize Britain's railways and other industries would reverse a 40-year trend of privatizations in Britain. MPs also criticized what they said was Corbyn's failure to campaign strongly against Brexit.

Now that's all changed.

"There have been a number of public apologies from members of the parliamentary party who've been critical of Jeremy in the past," Rees says. "They have had to now say, 'I'm sorry, I got it wrong.'"

Labour now sees a path to power led by Corbyn, who's known for his penchant for corduroy, pottering around his garden, making jam — and being a contrarian. He has long railed against the 2003 U.S.-led invasion of Iraq, nuclear power and austerity measures. On YouTube, videos show him in 1984, arguing for his right not to wear a jacket and tie in Parliament.

"He's like the Bernie Sanders of the U.K., but with a very refined accent," says Erika Uyterhoeven, a Boston native who worked for Sanders' presidential campaign and then moved to the U.K. to work for Corbyn.

"Both in U.S. and the U.K., young people are seeing healthcare get cut. Also with university fees — people are leaving with tens of thousands of dollars in debt," she says. "Young people see that the cards stacked against them."

Corbyn is hoping to build more support from both urban, educated young people and the working class, Labour's traditional base. But those two groups don't have much in common when it comes to the biggest issue of all: Brexit.

"Younger, more pro-European voters are extremely concerned about the Brexit, as against a group of more working-class voters, who are much more inclined to support leaving the EU," says Patrick Diamond, a political scientist at Queen Mary University of London. If he were to become prime minister, Diamond says, "Jeremy Corbyn would be forced to disappoint one or the other."

Some of Corbyn's success in last month's election gets chalked up to the protest vote. Nobody thought he would win. But a new poll puts his Labour Party eight points ahead of the Conservatives.

Last year's Brexit vote revealed disillusion with the status quo and mainstream politicians. It's put Britain on a path of real uncertainty. As May enters tough talks with Brussels, she could be forced from power at home at any moment.

Corbyn is waiting in the wings, possibly to become Britain's most unlikely prime minister.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.