ROME — Embattled Prime Minister Silvio Berlusconi pledged Tuesday to resign after Parliament approves a key reform bill, potentially signaling the end of an era of flamboyant leadership in Italy that in recent days has fueled this nation’s slide toward a full-blown debt crisis.

Berlusconi’s promise to step aside was conditioned on the approval of unpopular austerity measures. That could take weeks, after which Berlusconi could call early elections and possibly even run again. Some of his opponents were also quick to warn that Berlusconi, a political Houdini, could be launching a cunning ploy that would buy time to shore up failing support within his ruling coalition.

But other observers nevertheless viewed the announcement as a likely final chapter of his premiership. It came after political support for the 75-year-old media tycoon — who led Italy with a style that was part Rupert Murdoch, part Hugh Hefner — crumbled, with friends and foes alike demanding his departure.

In a twist of fate, his political undoing was coming not from the lurid list of allegations against him, including corruption and paying for sex with a minor, but instead from the debt crisis.

On Wednesday, Berlusconi told the La Stampa newspaper that he will not run again for office and instead back his former justice minister, Angelino Alfano, as his party’s candidate for prime minister.

Investors have been rapidly losing faith in deeply indebted Italy, the world’s eighth-largest economy. They fear a catastrophic default here that could send shock waves through global markets. Berlusconi himself was widely seen as a big part of the credibility problem, with his divisive leadership endangering political consensus on austerity measures and economic reforms demanded by European leaders to restore market confidence.

In making his offer, the prime minister, who has led Italy off and on for the better part of two decades, conceded that Parliament had become “paralyzed” by his bid to hold on to office. By promising to resign upon approval of those measures, he sought to clear the way for their passage.

But late Tuesday, Berlusconi’s opponents said they may try to press for a speedier ouster for the prime minister. Opposition leaders were calling for President Giorgio Napolitano, Italy’s ceremonial head of state, to back plans to install a new unity government run by a neutral political figure. Berlusconi, set to remain at very least a potential kingmaker in Italian politics, said he opposed the idea, instead backing a plan for new elections after his resignation — a race in which the prime minister could theoretically run again.

Berlusconi’s offer to resign, if carried out, would make him the highest-profile figure to fall in Europe’s two-year-old debt crisis, joining a club that includes leaders in Portugal, Ireland and, most recently, Greece. His pending exit raised fresh doubts about who would lead Italy through difficult times in the weeks and months ahead and whether its divided political class could unite behind a plan to win back investor faith.

“Evidently the markets don’t believe that Italy has the will to carry out the reforms that Europe asks of us,” Berlusconi told Sky TV after his announcement. “We have to show the markets that we are serious . . . for the good of the country.”

As Italy became the new focus of Europe’s debt crisis in recent days, overshadowing even near-bankrupt Greece, the calls for Berlusconi’s resignation mounted. They came to a head on Tuesday.

Earlier in the day, Berlusconi’s dear friend and most formidable ally, Northern League chief Umberto Bossi, openly called for the prime minister to go. That was quickly followed by a highly anticipated parliamentary showdown in which Berlusconi won a routine budget vote, but only after the opposition abstained.

The result showed that political defections among his supporters had left him roughly eight votes short of a majority in Parliament, making him vulnerable to a no-confidence vote.

Berlusconi is a consummate political survivor who has weathered more than 50 such votes over the years and should never be underestimated. Chances remained that his resignation offer amounted to a high-stakes political gambit to fend off a no-confidence vote from the opposition that could have brought down his government as early as Wednesday. By late Tuesday evening, however, Bossi and other Berlusconi backers were already promoting Angelino Alfano, the relatively young chief of Berlusconi’s People of Freedom Party, as his possible successor — a choice that would still give the prime minister ample behind-the-scenes political clout.

Berlusconi ruthlessly built his career — and became Italy’s richest man — while at the same time winning over Italians by presenting himself as an affable attention-seeker. His tabloid foibles — including allegations of orgies at his home, which led his ex-wife to describe him as “sick” — dealt blows to his popularity. As Italy became swept up in the debt crisis, his approval ratings were bottoming out in the low 30s.

“He has lost a lot of his electorate because they fear their savings will be wiped out in these conditions,” said Arianna Montanari, a professor of political sociology at La Sapienza University of Rome.

Observers here said his pledge to leave was hastened by a sense that Berlusconi was personally costing Italy its international credibility. They pointed to the smirks last month by German Chancellor Angela Merkel and French President Nicolas Sarkozy when asked about their faith in Berlusconi. At a summit of the Group of 20 leading economies last week, Berlusconi was effectively forced to accept economic oversight by the International Monetary Fund. An economic monitoring team from the European Commission is due to arrive in Rome on Wednesday.

The biggest loser in Berlusconi’s departure would be the prime minister himself. He has three trials pending in Milan, including one on charges of paying for sex with a minor and abusing power in the case of Moroccan nightclub dancer Karima El Mahroug, nicknamed Ruby Heart Stealer. He is also facing tax fraud and corruption charges.

By leaving office, Berlusconi will be somewhat less equipped to dodge those trials. Though unsuccessful in his attempt to pass a law that would have given him blanket protection from prosecution, as premier he has been able to delay court appearances when he can prove to the court that he has a “legitimate impediment” imposed by his job.

“You know that Mel Brooks movie, ‘Blazing Saddles’?” said Beppe Severgnini, author of a book on the prime minister. “Well, under Berlusconi, Italy was the spaghetti-western version. A lot of Italians, a lot of people everywhere, will be relieved when it’s over.”