WITH around two-thirds of the votes from Italy’s general election counted by the morning of March 5th, it was already clear that populism had won.

The leading party was the Five Star Movement (M5S). Capitalising on the anger of the south and the young at Italy’s arthritic economy, the M5S appeared to have broken through the 30% ceiling that it has long failed to breach in the polls. The other big winner from a ballot that will shake the rest of Europe was the hard right, populist Northern League, riding a wave of alarm in Italy over the arrival in recent years of hundreds of thousands of migrants. Taken with a third populist party, the far-right Brothers of Italy, anti-establishment parties look to have won comfortably over 50% of the vote.

Projections of the effect on parliament, which could yet prove unreliable because of Italy’s new and complex electoral system, showed it to be hung, with the M5S occupying more than a third of the seats in both houses; able to block any government it opposed. As one of its leading members, Alessandro Di Battista, put it: “They’re all going to have to come to speak to us.” The only feasible coalitions signalled by the partial results were M5S pacts with the centre-left Democratic Party (PD), which was trounced at the polls, or—the nightmare scenario for markets and pro-Europeans—the League. Under the pugnacious leadership of Matteo Salvini, the League (he dropped the word ‘Northern’ for the campaign to widen his appeal beyond the party’s original geographical base) was on course to take about 18% of the vote—four percentage points more than Silvio Berlusconi’s more moderate Forza Italia party. Mr Berlusconi had presented himself to voters, and Italy’s European partners, as the man to tame Mr Salvini and restrain his Euroscepticism. So much for that.

The League’s strong showing handed the leadership of the right to Mr Salvini. But his chances of becoming prime minister looked slim, even though a right-wing alliance including the League and Forza Italia had around 37% of the count.

Under the new electoral system, approximately two-thirds of lawmakers are chosen by proportional representation. But the remainder are elected on a first-past-the-post basis, and in the south the conservatives looked as if they would lose all but a handful of these seats to the M5S, which is particularly strong in the economically weaker mezzogiorno. In Sicily, the movement was poised to win them all. In his home-town constituency near Naples, the M5S’s prime ministerial candidate, Luigi Di Maio (pictured above, middle), took almost two-thirds of the votes.

The night’s big loser was the Democratic Party (PD), the senior partner in Paolo Gentiloni’s coalition government, which appeared to have scored below 20% in the partial count, barely mustering more votes than the regionally constrained League. Leading ministers, including the finance minister, Pier Carlo Padoan, were struggling to win in the new first-past-the-post constituencies.

The poor results for both Forza Italia and the PD appeared to rule out the outcome that had found most favour among worried investors: a coalition between the two more moderate mainstream parties.

But if no deal can be reached with the M5S in the foreseeably tortuous negotiations that will start once the results are known, other solutions are conceivable. They include a non-party government of technocrats, appointed by the president, and a very broad coalition, perhaps with a mandate to pass a new electoral law and then step aside to allow for another general election later in the year. But such ingenious ways out would scarcely reflect the spirit of a vote in which more than half the electorate voted for populism, radical change and new faces.

Despite some similarities, M5S and the League are nevertheless very different political creatures. Founded by a comedian, Beppe Grillo, the M5S refuses to define itself as either left- or right-wing—terms it argues have become outdated. The movement’s original mission was to install a new kind of internet-based direct democracy. Policies were, and to some extent still are, secondary. The M5S says it is environmentalist and pacifist, and will fight corruption as well as opposing EU-driven austerity.

Mr Di Maio, however, recently shelved the party’s demand for a referendum on Italy’s membership of the euro, and Mr Salvini has also said that he does not believe it is time for an exit from the single currency. But there is still plenty in the electoral programmes of both parties to rattle markets, such as lavish spending plans that would add several tens of billions of euros to Italy’s budget deficit and its already dauntingly high public debt, of around 130% of GDP.

What they also have in common is a sympathetic approach to Vladimir Putin’s Russia. Mr Putin too was one of the victors in Sunday’s election.