NEW DELHI, India (AP) _ India's president appointed a Hindu nationalist leader prime minister today, and invited his party to form its first government.

But the Bharatiya Janata Party and committed allies control only a third of parliament, and it is not clear whether they will be able to draw in enough partners to govern.

Other major parties, fearing a BJP government would rekindle Hindu-Muslim unrest, have said they would not join a government led by the Hindu nationalists.

President Shankar Dayal Sharma named BJP leader Atal Bihari Vajpayee prime minister today. Vajpayee replaces P.V. Narasimha Rao, whose Congress Party suffered a crushing defeat in India's monthlong election.

``The president has invited me to become the prime minister, and my Cabinet will be sworn in tomorrow,'' Vajpayee said after a meeting at the president's palace. ``I have accepted with gratitude.''

Vajpayee, 71, clutched a sheaf of papers that apparently were pledges of support from other parties, but it was unclear how many legislators in India's 545-seat lower house were behind him.

The president gave him until May 31 to put together a coalition, or lose the chance to govern.

The Bharatiya Janata Party has never even come close to power before. The group has been shunned by other political parties, which perceive it as anti-Muslim and fear it will widen the rift between the majority Hindus and Muslims, who make up 12 percent of India's 920 million people.

Some Muslims reacted to Vajpayee's appointment with apprehension.

``The Muslim voting strategy was intended to keep the BJP out of power. They'll be disappointed that they've failed,'' said Asghar Ali Engineer, a Muslim commentator. The BJP's policies are ``definitely anti-minority,'' he said.

But the Bombay stock exchange gave a positive response, rising 64 points to close at 3798.47 points from its midday low.

``The BJP will be good for the economy,'' said Vivek Jasuja, an analyst with SSKI Ltd., India's largest brokerage company.

Investors would prefer the Bharatiya Janata Party over a leftist alliance that is more critical of Rao's market reforms than the Hindu nationalists are.

The Hindu nationalist party advocates a repeal of Muslims' special rights; arming India with nuclear weapons; taking a more forceful policy toward Islamic neighbor Pakistan, and tightening restrictions on foreign investment.

Vajpayee served as foreign minister when a precursor of the Bharatiya Janata Party joined a socialist government in 1977. During that government's two-year tenure, he was generally considered to have improved relations with Pakistan, India's hostile neighbor.

The Bharatiya Janata Party and the National Front _ a loose alliance of socialist, communist and lower-caste parties _ have both been maneuvering furiously to find alliance partners and potential prime ministerial candidates since voting ended last week.

No party won a majority, but Bharatiya Janata won the most seats and custom dictated it be given the first chance to form a government.

The president appointed Vajpayee as prime minister 15 minutes after he received the official results from the Election Commission from 534 districts where vote-counting has been completed. The Hindu nationalists were the largest winners: They and their declared allies command 186 seats.

With his swearing-in Thursday, Vajpayee will end the dominance of the Congress Party, which has governed India for all but four years since the country won independence from the British in 1947.

Infighting, corruption scandals and poorly chosen alliances with regional parties cost the Congress Party crucial support, and it placed second in the elections.

The Congress Party swung its weight behind the National Front, but refused to join a National Front Cabinet. Both Congress and the National Front have said they won't support the Bharatiya Janata Party.

The Congress Party won 136 seats in the elections, its worst showing since India's first election in 1952. The National Front had 111 seats, and the remaining 101 went to regional groups and independents.