ROME — When the Five Star Movement took power in Italy in 2018, the party’s boyish and immaculately dressed political leader, Luigi Di Maio, emerged as the reassuring face of a political force transitioning from protest movement to a mature governing party.
On Wednesday, Mr. Di Maio became the face of a party in disarray and a governing coalition in deep difficulty as he resigned his leadership position amid falling poll numbers and climbing internal dissatisfaction.
His exit raises the prospect of yet another government crisis for Italy and early elections that could open the door to the hard-right leader Matteo Salvini.
“Today I am here to tender my resignation as the political leader of the Five Star Movement,” said Mr. Di Maio, now 33 as he delivered an often angry speech against his internal enemies in front of a backdrop reading, “the future is now.”
“As far as I’m concerned,” he added, “this is only the end of a phase.”
Mr. Di Maio apparently will retain his role as Italy’s foreign minister. His resignation as party leader comes after months of cratering poll numbers, defections and infighting as Five Star has struggled to keep its bold, pie-in-the-sky promises and allay concerns about its inexperience on the economy and foreign policy.
The announcement also comes just days before critical regional elections in which Five Star is expected to do miserably, piling even more pressure on the party and on its governing coalition with the center-left Democratic Party.
Mr. Salvini, in contrast, is expected to perform very well in the vote.
Last summer, Mr. Salvini dramatically broke his alliance with Five Star and Mr. Di Maio, his fellow deputy prime minister, and fell out of power in an overreach.
Five Star then stayed in office by forming a new governing coalition with its traditional enemies in the Democratic Party. That coalition has proved wobbly as Mr. Salvini, an increasingly strong force of opposition, has agitated for early national elections.
By Wednesday, Mr. Salvini had moved beyond attacking Mr. Di Maio, saying that “another will arrive after him,” and that Five Star voters would continue to “make it pay” for its alliance with the Democratic Party.
“You will see Sunday,” he said, referring to the day of the regional elections.
Mr. Di Maio’s other former allies, including Prime Minister Giuseppe Conte, a law professor who was plucked from obscurity by Five Star to become Italy’s leader in 2018, were more measured in their reaction to Mr. Di Maio’s stepping back.
“If this will be his decision, I will respect him,” Mr. Conte told Italian radio on Wednesday morning, saying that it would be an initiative taken by Mr. Di Maio “with great responsibility.”
He would be sad, he added, “on a personal level.”
Mr. Di Maio’s retreat reflects a steep plunge in a trajectory that seemed to rise out of nowhere. A college dropout and former soccer stadium usher, he became an early favorite in the new Five Star universe. He won 189 votes on the party’s online nomination platform, enough to get his name on the national ballot and put him in Parliament when Five Star shocked Italy with strong results in 2013.
At age 26, Mr. Di Maio — who is often called by the nickname Gigi — became vice president of the lower house of Parliament. He served as a jacket-and-tie man to his party’s co-founder Beppe Grillo, a provocative comedian, as they campaigned around the country.
Behind the scenes, he was a trusted ally of Davide Casaleggio, a web entrepreneur and son of the party’s other co-founder, who many say is the party’s true power.
In March 2018, under Mr. Di Maio’s leadership, the party won 33 percent of the Italian vote, and then formed a nationalist and anti-establishment coalition with Mr. Salvini’s League.
The European establishment deeply feared the populist government, given the parties’ antagonism to the euro, support for Russia and opposition to European demands that Italy lower its astronomic debt.
Italy’s economy struggled during their government, and the partnership took a toll on Five Star’s popularity, which fell by half.
That erosion of support has not stopped under the new alliance with the Democratic Party, and in recent weeks Mr. Di Maio faced a raft of defections, some to Mr. Salvini’s party, and demands that he involve lawmakers more in decision making.
“Enough already — if they keep going like this, I’ll quit,” he was quoted as saying in the Corriere della Sera newspaper on Jan. 11. “Let’s see what they know how to do. Let them try to lead the Movement.”
On Italian television he said that his party was trying to stab him in the back.
On Wednesday, urged that the government, in which he still serves as foreign minister, continue.
But foreign affairs have not exactly been Mr. Di Maio’s strong suit.
Before he led the foreign ministry, Mr. Di Maio’s most notable previous foray onto the world stage was a road trip to support the Yellow Vest protesters in France. That move prompted the recall of the French ambassador from Rome and plunged relations between Italy and France to their lowest point since World War II.
In his previous role as minister for economic development, Mr. Di Maio made several trips to Beijing to court President Xi Jinping of China, whom he referred to, perhaps counterproductively, as Mr. Ping.
Mr. Di Maio has been geopolitically balanced in his misnomers. In a public appearance with Secretary of State Mike Pompeo, he gestured to the American and called him “Secretary Ross,” apparently referring to Commerce Secretary Wilbur Ross.
Speculation was rife on Wednesday about who would replace Mr. Di Maio as party leader. While he said that Vito Crimi, Italy’s deputy interior minister, would take over the party leadership in the short term, questions remain about whether Mr. Di Maio will try to stage a comeback or whether others who have been waiting in the wings will step forward.
One is Alessandro Di Battista, a longtime party activist and firebrand who campaigned across Italy on his motorcycle and has called for the party to return to its anti-establishment roots.
Mr. Di Battista, who was a motivational dancer in Sicilian resorts before turning to political activism, opposes the alliance with the Democratic Party, which he enjoys eviscerating, and is on hiatus from government as he travels the world. He recently posted a picture on Instagram of himself sitting on the Tehran subway, reading a policy book.
“I will come back soon,” he wrote in the comments to the post. “I promise you.”