It was just three weeks ago, but in political terms it seems like an aeon. Bare-chested, suntanned and smiling broadly, Matteo Salvini took a turn at a DJ's turntable at a beach club on the Italian coast while young women in leopard print bikinis gyrated in front of him.

It was just three weeks ago, but in political terms it seems like an aeon. Bare-chested, suntanned and smiling broadly, Matteo Salvini took a turn at a DJ's turntable at a beach club on the Italian coast while young women in leopard print bikinis gyrated in front of him.

Italy's ring-wing was larging it up. The deputy prime minister and head of the hard-right League party was having the time of his life at the Papeete Beach Club at Milano Marittima on the Adriatic. Buoyed by the presence of the celebrity hard-right minister, the crowd was euphoric when a remixed version of Italy's national anthem was blasted from giant speakers.

Please log in or register with Independent.ie for free access to this article.

Very classy stuff. But then Matteo Salvini seemed invincible. Since the general election in March last year, he had emerged as Italy's de facto prime minister, more than doubling voter support for the League.

A few days after his beach antics, he precipitated a crisis with his coalition partners, the Five Star Movement, that brought down Italy's government. His aim was to demand fresh elections and have himself elected as prime minister at the head of a new, far-right alliance.

But that was then.

Just as the torrid days of early August have given way to thunderstorms across much of Italy, dark clouds have descended over Salvini's ambitions.

His tactic appears to have backfired. Instead of marching triumphantly towards Rome and elections, hand in hand with the far-right Brothers of Italy party, Salvini now risks being shut out of power altogether.

His erstwhile ally, the anti-establishment Five Star Movement, is in frantic backroom talks with the centre-left opposition, the Democratic Party (PD), to concoct a new alliance.

At the Papeete Beach Club, where Salvini made such a splash earlier this month, the sizzling heat has been replaced by leaden skies and choppy seas.

Many of those lying on sunbeds or playing with their children think the League supremo has made a serious miscalculation.

"The move to create a government crisis has become an act of self-harm," said Pietro Zumerle (53), a former racing car driver from Verona, who owns a web marketing business. "The way he did it managed to upset everyone - first he created the crisis, then he retreated, making his own supporters angry. To hand the government over to the left is not what he wanted. Something went amiss in his plan.''

Thomas (47), a businessman from Milan who declined to give his surname, said: "Salvini made a wrong move because he was too power hungry. He was acting like a prime minister because those around him made him think he was so popular he could do whatever he wanted. He put himself in this corner."

But others think that Salvini is playing the long game. "He unmasked the crisis inside the coalition and forced the Five Star camp to show their cards. I think they fell into his trap," said Francesca, a doctor from the northern Veneto region.

Even if an election is months or years away, she said that voters will ultimately reward Salvini for his policy of closing Italy's ports to migrants and refugees fleeing Libya.

"Italians have had enough of immigration and there is a hidden consensus that will reflect that."

Sergio Mattarella, Italy's president, has given Five Star and the PD, which were bitter rivals until last week, until Wednesday to try to hammer out an accord and form a credible government. If it can be formed, and it is a big 'if', then the idea is that it would last for the rest of the legislature - another four years.

For Salvini, the sunshine, the dancers and the mojitos all now seem a distant dream for the man nicknamed by his supporters Il Capitano - the Captain.

The political ructions of the last two weeks have led to a sharp drop in the League's popularity - from around 39pc before the crisis erupted to 31%. Meanwhile his two adversaries have seen their support rise - from 22pc to 25pc for the PD and from 17pc to 21pc for the Five Star Movement.

From being apparent kingmakers, the League have become underdogs - and vice versa for Five Star. "Salvini has got wrong everything that he could have got wrong," said Maria Elena Boschi, a leading member of the PD and a former minister. "He no longer has the air of invincibility he once had. Even inside his party there are people now doubting his political acumen."

Many analysts agree. Alessandra Ghisleri, from Euromedia research, said: "An element of vulnerability has emerged around Salvini from this crisis."

Despite the setbacks, it is far too early to write Salvini's political obituary. There is a decent chance that Five Star and the PD will be unable to forge a new coalition. Or if they do, it might not survive very long.

They differ on a wide range of key issues, from parliamentary reform - Five Star wants to slash the number of MPs and senators in Italy's bloated parliament from 945 to 600 - to public spending, immigration and attitudes toward the EU.

But if the two parties do form a new government, and elections are averted, Salvini could be in the political wilderness for years and there is likely to be widespread anger among League supporters.

As dusk falls at the Papeete Club, holidaymakers are muttering darkly about the putative new coalition between Five Star and the PD being a stitch-up by Italy's 'poteri forti' - the 'powerful forces' of the establishment.

Anger could spill out onto the streets - a few beachgoers say they think a "rivolta popolare", or popular revolt, is not out of the question if Salvini is pushed to the margins.

There will be particular fury across Italy's north, the traditional heartland of the League, said Claudio Testa, (40), from Milan. "Revolt? I don't think so. But protests in the piazzas? Definitely."