A week is a very long time in Italian politics, but also no time at all. When the last issue of the LRB went to press on 25 May, it looked as though a new government was about to be formed in Rome. The Movimento 5 Stelle and the Lega had drawn up, signed and approved a coalition agreement – a curious and probably unworkable mix of their variously anti-establishment and racist policies – and nominated Giuseppe Conte to be prime minister. The president of the Republic, Sergio Mattarella, had reluctantly agreed to ask Conte to form a government. But then it all fell apart when Mattarella and the leader of the Lega, Matteo Salvini, couldn't agree on who would be finance minister: Salvini refused to propose anyone except the eurosceptic Paolo Savona; Mattarella refused to give him the job; Conte threw in the towel; ricominciamo da capo.

Luigi Di Maio, the leader of the M5S, took to Facebook to record a video calling for street protests, and it was hard not to wonder if he wasn't happier as an opposition figure with a canny social media strategy than he would be in government. (A few days earlier, Guy Verhofstadt had grilled Mark Zuckerberg in the European Parliament. A lot of Italians see the EU as an enemy of democracy, but so – less visibly – is Facebook, and the EU is one of the few bodies with the clout to curb the digital monopolies' powers.)

There was a lot of talk of coups and subverting the will of the people, even the suggestion that Mattarella should be 'impeached', but the president was acting according to his constitutional rights – his duty, even – to defend the Republic. Vague death threats were issued against him on social media, suggesting it was time he join his brother, murdered by the mafia in 1980. The centre-left Partito Democratico, or what remains of it, rallied behind him, under the banner of a 'republican front'.

Accusations that Mattarella was subverting democracy might have been more convincing if Conte and Savona had themselves been elected. If the M5S and Lega had proposed a cabinet led by Di Maio, the leader of the party with the most votes at the last election and the most seats in Parliament, Mattarella might have found it harder to block.

Mattarella proposed a caretaker administration led by Carlo Cottarelli, a former director of the IMF, to draw up a budget and prepare for fresh elections next year. If it failed a vote of confidence in Parliament – as it was bound to – there would be a vote in the autumn. Salvini said that wasn't good enough: Italy should go to the polls immediately.

Amid the uncertainty, the Italian stock market went down and the cost of borrowing went up: the notorious spread – the difference between interest rates on Italian and German 10-year bonds – went over 300 points for the first time in years. EU officials made unhelpful remarks about how the Italians needed to start behaving more responsibly. 'More work, less corruption, seriousness,' Jean-Claude Juncker said – just the kind of attitude that makes Brussels hated, and stokes support for parties hostile to the EU. The way Italy gets talked about, you wouldn't think it had run a primary budget surplus every year since 1992 apart from 2009; its enormous debt (more than 130 per cent of GDP, the second highest in Europe after Greece) was largely accrued in the 1980s.

Opinion polls suggested that a M5S-Lega coalition would win more than 90 per cent of the vote if an election were held immediately. But it also looked as if a right-wing coalition of the Lega, Berlusconi's Forza Italia and the extreme right Fratelli d'Italia – the three parties contested the election together in March – could win enough to get an outright majority, handing Salvini the premiership and leaving the M5S out in the cold, the high water mark of their electoral success having passed without their having formed a government.

But then the M5S and the Lega said they were prepared to have another go at putting a cabinet together after all, without Savona. Rumour had it that Salvini had realised elections in July wouldn't be so great for the Lega, because too many of its voters would be away at the seaside. Whatever the reasons, they came up with a compromise solution that Mattarella could live with, and we're more or less back where we were a week ago, with Conte as PM, and Salvini and Di Maio his deputies. The government is about to be sworn in, and will probably last longer than three days, but I wouldn't be surprised if there were fresh elections before the year is out.