NEW DELHI — Arvind Kejriwal, a protest leader who was vaulted into the top post of Delhi’s city government after a startling electoral victory, resigned from his seat after just 49 tumultuous days in office on Friday, saying his central anticorruption initiative was being stonewalled by legislators from India’s two well-established parties.

Mr. Kejriwal had threatened to quit unless Delhi’s legislative assembly passed the Jan Lokpal Bill, which would create a body responsible for investigating complaints of corruption against public officials. The threat initially sounded dramatic, coming so soon after he had taken office. But by Friday, the assembly had descended into uproar, and his motion to introduce a vote on the bill was defeated.

Mr. Kejriwal framed his decision as a principled one, and when he addressed supporters outside his party headquarters, they cheered as if he were announcing a victory. He said he would request that new elections for the legislative assembly be held as soon as possible.

Many viewed his decision as a strategic move, allowing him to shift his focus to a more ambitious goal: Buoyed by its success in Delhi, his Aam Aadmi Party now plans to put forward hundreds of candidates in the general elections in May, posing an unexpected challenge the country’s two heavyweights, Indian National Congress and Bharatiya Janata Party, known by its acronym, B.J.P.

“I am a very ordinary man, and I did not come here for power,” he told several hundred cheering supporters, who had gathered outside his party headquarters. “If I have to give up the chief minister’s chair a hundred times, I will sacrifice it a hundred times. If I have to sacrifice my life for the country, I would consider myself fortunate.”

Mr. Kejriwal said he would request that new elections for Delhi’s legislative assembly be held as soon as possible. Typically, the lieutenant governor would invite the assembly’s largest party — in this case, the B.J.P., which has 31 seats — to form a new state government. If the B.J.P. refuses, the assembly will be dissolved and new elections will be held. In the interim, Delhi would come under presidential rule.

In some ways, Mr. Kejriwal’s resignation signaled the swift deflation of a political experiment. Last year, his party seemed to capture the swelling frustration of this city’s middle classes — voters who say they have become increasingly alienated from those who govern them — and stunned the political class by winning 28 of Delhi’s 70 seats.

Finding himself unexpectedly in office, he faced an extraordinary challenge making good on his campaign promises. Thousands of part-time teachers had canvassed for him based on the expectation that he would make them full-time, a move that would have severely strained the state budget.

A still more sobering reality is that governing without a majority in any legislative body here is frustrating, if not impossible. As chief minister, Mr. Kejriwal did not have control over central functions, like the Delhi Police. That friction had boiled over almost immediately, and Mr. Kejriwal declared a sit-in outside the office of the minister who oversees the city police. Opposition legislators had started a campaign to force one of his ministers to resign.

Those challenges were mounting quickly, and some analysts on Friday said Mr. Kejriwal never had much interest in resolving them.

“It was clear from the beginning that Arvind Kejriwal did not want to govern,” said Girish Kuber, editor of LokSatta, a Mumbai-based newspaper. “The writing was on the wall that it wouldn’t last, and the important thing was that he himself didn’t want it to work. He sensed that he has a critical role to play during parliamentary elections, and is hoping to cash in on what happened in Delhi.”

Still, India’s political culture clearly rewards renunciation, and many believed that Mr. Kejriwal had devised a brilliant beginning for his next act. Though Mr. Kejriwal’s dramatic gestures since taking office, like the sit-in, may have alienated elites, “the underclasses still see him as a savior,” said Neerja Chowdhury, a journalist and political analyst.

“He has taken a gamble,” she said. “He is going to go national, and he has decided that this is the way to do it.”

Indeed, the supporters who flooded the street outside the Aam Aadmi Party’s office on Friday were elated. Ajay Rai, a pharmacy owner, said the B.J.P. and Congress had “colluded to make sure this government does not function,” and had prevented Mr. Kejriwal from fulfilling his promise of good governance. Archana Agnihotri, 51, a full-time party volunteer, described the decision as a wise one.

“My respect for Arvind Kejriwal has grown,” she said. “He made a promise, and he is keeping it.”

A version of this article appears in print on , on Page A6 of the New York edition with the headline: Chief Minister of Delhi Resigns After 49 Days, Citing Resistance to Antigraft Bill. Order Reprints | Today’s Paper | Subscribe