The London Olympics have been a boon to the city and its mayor. Some wonder whether the goofy Boris Johnson might even become prime minister.

LONDON — For most politicians, getting stuck on a zip line and dangling helplessly in midair for several minutes above crowds of pointing spectators would be a public relations nightmare from which they'd prefer not to wake up.

Boris Johnson isn't like most politicians.

With his usual goofy aplomb, London's mayor continued to wave the Union Jacks in his hands and crack wise until somebody guided him back onto solid ground.

A pundit compared his suspended figure to a "giant, suited baby attempting semaphore," while memes sprouted across the Internet showing his burly, harnessed frame hanging off Big Ben, from a giraffe's mouth and beside a strung-up Tom Cruise in "Mission: Impossible."

But rather than being an embarrassment, last week's incident at an Olympics celebration was chalked up as yet another example of the irrepressible personality and clownish charm that has seen Johnson elected twice to lead the British capital.

This is "BoJo's" world, one in which the regular rules of politics seem not to apply and liabilities somehow become assets.

This also appears to be Johnson's hour, as he basks in the glow of the so far successful London Games, which have burnished both his reputation and the city's. Even before the final medals have been handed out, the talk here has turned to whether the Olympics can bring Johnson political gold, perhaps in the form of a run at Cameron's job.

A recently released poll showed that 36% of respondents thought Johnson was suitable to be prime minister, up from 24% in May. The ruling Conservative Party, unpopular because of its harsh austerity measures, would also see its ratings rise within striking distance of the opposition Labor Party if he became its leader, according to the survey.

Johnson has been quick to play down such expectations, aware that his bounce in the polls could prove fleeting once the Olympics leave town. This is the man who once said he had about as much chance of becoming prime minister as he had of being reincarnated as an olive.

"This will all come crashing down," Johnson told the Evening Standard newspaper last week. "Adulation is fine. But we all know these things are cyclical."

Still, analysts say not to count Johnson out. Beneath the jokey exterior, the tousled hair and sometimes buffoonish persona — all of which is deliberate, not spontaneous, some say — lies the brain of a shrewd political operator whose ambition has been outrun, at times, only by his mouth.

He is undeniably smart, a graduate of Eton, Britain'smost famous prep school, and Oxford University. He has published several books, including a study of ancient Rome, a comic novel and a collection of essays.

And his charisma as an amusing speaker and as a bit of a political maverick has endeared him to voters beyond the Conservative Party's traditional base, encompassing upper-middle-class, left-leaning Londoners who otherwise find the party off-putting. Analysts say Johnson tends to be ideologically flexible; his ardent support of the free market goes down well with true-blue Conservatives, for example, but not his more relaxed attitude on immigration, a Tory bugbear.

"It's easy to underestimate him. Lots of people said he couldn't become mayor of London and he did," said Tony Travers, an expert on British politics at the London School of Economics. "He's seen as an eccentric in a country where being seen as an eccentric is almost always a positive thing."

But formidable obstacles would remain for Johnson if he were to try to become a national leader. Some have to do with the practicalities of the British political system, which require Johnson to win election as a member of Parliament first before he could contemplate moving into 10 Downing St. How that would fit in with his second term as mayor, which ends in 2016, is unclear.

Then there is the heightened scrutiny that comes with national politics.

Once a member of the Conservatives' front bench when they were in opposition, Johnson was sacked by the party leader in 2004 when it emerged that the future mayor had not only cheated on his wife but lied to senior colleagues about it. Many Brits still laugh at the memory of Johnson telling reporters on his doorstep that he and his wife were working things out, only for him to turn around and find that he had been locked out of the house.

"There are no disasters, only opportunities. And, indeed, opportunities for fresh disasters," Johnson was famously quoted as saying around that time.

Some analysts also say that Johnson has succeeded as mayor of London in part because the post does not entail much power, except in areas of transportation and policing. That makes it driven more by personality than results, which suits a politician with Johnson's bonhomie and irreverence.

Being prime minister is altogether different, requiring a gravitas that some Britons may not think Johnson has.

"Voters could be highly amused and love his authenticity, until the moment comes to decide during an election campaign whether they want him in charge of the tax system and Britain's nuclear deterrent," Daily Telegraph columnist Iain Martin wrote recently. "His challenge in the next couple of years is surely to show that he is serious enough to be trusted with the highest office."

For now, Johnson says he remains focused on the Olympics and does not intend to rest on his laurels afterward, if only because they may prove short-lived.

"I'm very proud of the way things are going at the moment," he said in his interview with the Evening Standard. "But there are going to be some very hard yards after the Games are over."