India's first Hindu nationalist government collapsed today after just 13 days in power, as Prime Minister Atal Bihari Vajpayee resigned rather than face a vote of confidence in Parliament that his party was sure to lose.

President Shankar Sharma quickly nominated as Vajpayee's successor H.D. Deve Gowda, leader of a multi-party alliance of leftist and regional parties that acquired a name, the United Front, just last week. Gowda is to take office Saturday and faces a June 12 deadline to prove his alliance can forge a majority in Parliament.

The political instability in the world's largest democracy -- one government ousted, another anointed in a matter of hours -- flowed from the inconclusive results of a month-long election that knocked the Congress party from its long dominance and gave the Hindu nationalist Bharatiya Janata Party (BJP) the largest number of seats in Parliament, though far from a majority.

Vajpayee, considered a moderate within the BJP, gave in after his repeated attempts to soften the party's reputation for religious intolerance and expand its support in Parliament failed. As the confidence vote loomed, the BJP had not announced the addition of a single supporter since forming a government May 16.

India's stock markets fell with the BJP's minority coalition government, which investors had expected to pursue free-market policies despite the party's rhetorical fits of economic nationalism. Business interests have been nervous about Gowda's alliance -- even though he has been market-oriented as the chief minister of the southern state of Karnataka since 1994 -- because the socialist and communist parties are among its members.

But the Congress party, which declined to join the government but whose support gave the alliance the crucial parliamentary majority on paper, has insisted that the incoming government continue the economic opening that Congress prime minister P.V. Narasimha Rao initiated in 1991. However uncertain its durability, the next government will mark shifts in India's traditional power alignments away from the upper castes and the Hindi-speaking north, which traditionally have controlled the national government in Delhi, toward the lower castes and a south that mainly speaks languages unrelated to Hindi.

Gowda, 63, will become the second southerner after Rao to hold the premiership -- and also the second who does not belong to one of the highest castes, the ranks Hindus are born to defining social status, religious purity and traditional occupations. The first prime minister with a middling caste background similar to Gowda's, Charan Singh, held office for six months ending in early 1980.

If the United Front, Congress and the front's other partners hold together as well as they have over the last two weeks, they should have no trouble prevailing on a vote of confidence. This evening, Gowda delivered pledges to Sharma from 190 legislators, not counting the 136 members of the Congress party. Their combined total of 326 votes would represent more than 60 percent of the lower house of Parliament, whose membership currently stands at 534. To avert defections to the BJP, some of the United Front's 13 parties corralled new lawmakers in the guest houses where states lodge official visitors to the capital. Some front members were only allowed to go out together on chartered buses.

Even BJP opponents paid tribute to the party for not even attempting what apparently has been a long-standing custom in India -- the offer of briefcases full of cash in exchange for a switch in political loyalties.

Vajpayee, 71, made his resignation announcement almost offhandedly as two days of divisive debate on a confidence motion drew to a close. "Mr. Speaker, I'm going to the president to give my resignation," he said, causing a clamor among BJP opponents in Parliament. The speaker ruled the resignation made a confidence vote moot.

Party strategists had floated the possibility of a resignation as a way to stimulate public sympathy and lay the groundwork for a BJP comeback in the next election, which most political observers predict will come long before the next scheduled vote in 2001.

"If you want to form a government leaving us out, I don't see any signs of its stability," Vajpayee told Parliament. "The birth is difficult, and after the birth, survival is difficult. For everything, you have to run to the Congress."

Home Minister Murli Manohar Joshi, a BJP hard-liner, suggested that the United Front would provide "proxy government by the Congress," because it has more than three times as many members as the front's largest party. The social democratic Janata Dal, Gowda's party, has 44 seats compared with Congress's 136. Congress could bring down the coalition government, which it will not join as a partner, by withdrawing its voting support in Parliament.

BJP leaders are to meet Wednesday to plan strategy. One major question is whether the party will continue Vajpayee's path of moderation and plant itself firmly in the political mainstream, or whether hard-liners will successfully argue that a parliamentary majority lies in stronger Hindu nationalism.

Some BJP opponents charged that the party had used its brief stay in power to copy sensitive documents that could be used as the basis of political attacks as the main opposition party. One critic described Vajpayee's as a "photocopy government," a charge that went unanswered in Parliament.

The two-day debate centered on the BJP's record of provoking communal tensions between India's Hindu majority and its sizable Muslim minority, especially the party's campaign leading to the 1992 destruction of a 16th-century mosque in Ayodhya. The party's close ties to a secretive Hindu brotherhood, the Rashtriya Swayamsevak Sangh (National Volunteer Corps), also came under attack.

"Without pluralism, this country will be broken into pieces," said Indrajit Gupta, a senior Communist member of Parliament. "Not only Hindus live here. Not only Hindus are citizens. . . . Do you think they are equal citizens?" CAPTION: Atal Bihari Vajpayee clasps his hands in farewell to supporters after resigning.