This story was updated at 7:50 pm EDT.

The anti-establishment 5-Star Movement looked set to easily win the election for the mayor of Rome on Sunday and clinch a surprise victory in Turin, in a major setback for Prime Minister Matteo Renzi.

The result is a breakthrough for 5-Star and is likely to pile pressure on Renzi, who faces a crucial referendum on constitutional reform in October on which he has staked his political career.

The prime minister has struggled to boost economic growth after years of stagnation and been hurt by scandals in the banking sector. He has also been criticized by PD hardliners, who say he has moved his party too far to the right.

In the runoff ballot in Rome, the 5-Star candidate, Virginia Raggi, was on course to win a commanding 67 percent of the vote, against 33 percent for the center-left's Roberto Giachetti, making her the capital's first woman mayor.

"We put ourselves on the line and we lost," said the PD's Stefano Esposito, a close Renzi ally, as the extent of the defeat in Rome became clear.

In some consolation for the prime minister, the PD looked likely to cling on to the financial capital, Milan, but the biggest shock came in Turin, the home of carmaker Fiat.

In the traditional center-left stronghold, the incumbent Piero Fassino was trailing the 5-Star's candidate Chiara Appendino, who overturned an 11 point gap after the first round ballot on June 5.

Five-Star supporters gathered outside Appendino's headquarters to give voice to the movement's trademark chant of "Onesta" (Honesty).

The result is a huge boost for 5-Star, the movement founded seven years ago by comedian Beppe Grillo, which has so far controlled just a handful of medium-sized towns.

If it can successfully manage both Rome and Turin, the party, which is running a close second to the PD in opinion polls, would be in a strong position to take power in national elections due in 2018.

Virginia Raggi
Virginia Raggi, 5-Star Movement candidate for Rome’s mayor, casts her vote at a polling station in Rome, June 19, 2016. REUTERS/Remo Casilli

The fiery Grillo, 67, has retreated from front-line politics over the last 18 months, making way for a generation of young leaders who have given 5-Star a more moderate image and broader appeal.

Five-Star's protests against rampant corruption in Italian public life remains its chief asset. However, analysts say it has outgrown its image as purely a party of protest and its proposals are now also being taken seriously.

These include universal income support for the poor, tougher penalties on white-collar crime and tax evasion, closing down or privatizing many publicly owned companies and cutting taxes for small businesses.

Renzi has insisted the vote will have no impact on his government's stability and has focused instead on the October referendum, which he calls "the mother of all battles."

Renzi has said he will retire from politics if Italians reject his proposals to wrest decision-making autonomy from the regions and reduce the powers of the upper house senate.

He says the reforms will increase government stability and streamline parliamentary decision-making, but recent opinion polls suggest the outcome may be extremely close.

Some 8.6 million people, around a fifth of the total electorate, were eligible to vote on Sunday for mayors of 126 towns and cities where no candidate won more than 50 percent of the vote in a first round of voting.

Naples, Italy's third-largest city, was already a lost cause for the PD, whose candidate was knocked out on June 5.

In the runoff in the southern port city, the incumbent former prosecutor Luigi de Magistris, who has no party affiliation, looked set to win easily against his center-right opponent.

In Bologna, a traditional PD stronghold, its candidate won through with around 55 percent of the vote against a rival from the right-wing Northern League, according to vote projections.