Why would India, an emerging giant eager for worldwide clout and foreign investment, risk isolation and sanctions by exploding nuclear weapons?

It is a puzzle difficult for outsiders to fathom. But here in the world's largest democracy - a nation that has long felt belittled by Western powers and threatened by hostile neighbors - it is a question that has deep cultural and political resonance.By testing three nuclear devices - including a suspected hydrogen bomb - for the first time in 24 years on Monday, military analysts say, India proved it has weapons capabilities and scientific know-how that cannot be ignored. It was also a clear message that India can stand up to perceived challenges from neighbors Pakistan and China, against whom India has fought four wars since 1947.

India says China has underground weapons at the Tibetan border and is amassing military facilities on nearby Burmese islands.

It was a risky gambit and one that could backfire if the United States leads a move to censure India through economic punishments and diplomatic cold shoulders. But it was also one that could pay off big. The world might finally accept India into the club of great powers, and India in turn might be more willing to sign a comprehensive test ban, analysts say. Meanwhile, opponents of the 2-month-old Hindu nationalist government could be silenced for now, as the testing won approval here across the political spectrum.

"It's about time the world accepted India as a nuclear power and stopped making things worse by trying to level sanctions against us," said Arjan Singh, a retired former commander of the Indian Air Force. "Sanctions are not effective, and they'd only unite the nation against the outside."

Behind India's controversial act, he said, is the "feeling that we're not being recognized by world powers."

He added, "A lot of advanced countries are not backing a seat for India in the Security Council, even though India deserves it in every way: We are a democracy, we have economic strength, and we contribute resources and peacekeepers all over the world to help the U.N."

India's government, led by the Bharatiya Janata Party, stood its ground Tuesday despite an international furor over the tests. Australia said it would recall its High Commissioner from New Delhi, the strongest step before cutting off diplomatic relations, while Japan, India's biggest donor, is considering sanctions.

But in a nation that often seems to have twice as many opinions as people, there is an unusual agreement in most circles here that India has the right to test its capabilities as other powers have in the past. Some environmentalists and anti-nuclear groups criticized the move Tuesday, but at least one leading disarmament activist refused to condemn the government.

Dhirendra Sharma, a retired professor of science policy at Jawaharlal Nehru University and convener of India's National Committee for Sane Nuclear Policy, said that while he "cannot congratulate the New Delhi government for doing this test, my condemnation is more against the U.S. government."

"They have not respected the aspirations of the Indian people, they have not made concessions and they have not treated us on an equal basis," he said. "It's not a question of morals but of political requirements."

The club of the five declared nuclear powers - the United States, Russia, France, Great Britain and China - is seen here as an elite and hypocritical group that wants test bans and disarmament as a way to maintain its own nuclear power, while keeping weapons out of the hands of other nations.

The United States has conducted more nuclear tests than anyone else over the years, a total of 1,032, compared to Russia's 715, China's 44 and India's six, as of Wednesday.

India, the first nation to call for nuclear disarmament four decades ago, has long said it would sign a test ban and nonproliferation treaty only if the five nuclear powers agree to the destruction of all nuclear weapons by some target date, which they have refused to do. Without disarmament, New Delhi says, a test ban amounts to nothing more than "nuclear apartheid," preventing those who have not yet acquired weapons technology from developing it.

Indians also complain that the great powers have continued their own tests when it suited them. France conducted six nuclear tests in 1996 before signing onto the Comprehensive Test Ban Treaty, while China conducted two tests that year and two in 1995 before declaring a moratorium. Both did so without facing sanctions, Indians point out.

Similarly, U.S. ally Pakistan - India's biggest rival - was caught several years ago with plutonium-enriching material and is believed to be conducting a nuclear program with China's aid, yet it has avoided sanctions or world opprobrium. Israel, too, is widely believed to have nuclear capabilities.

A 1994 U.S. statute mandates that Washington punish any undeclared nuclear power that detonates a device. The law prohibits most foreign aid, military sales and export credits to any violator and forces the United States to vote against international loans to that country.

Direct U.S. aid to India last year included $51 million in development aid and $41 million for military equipment - small amounts in relative terms. A larger problem for India would be U.S. opposition to World Bank loans to India, which are expected to total $3 billion this year.

New Delhi is likely hoping that the United States will let this blow over. "We are confident the Americans appreciate the special security needs of our country, just as we appreciate the need for universal nuclear disarmament and remain committed to it," said Narendra Nath Jha, the Bharatiya Janata Party's foreign policy adviser.

Observers say that despite speculation that the party did this to gain support for a weak coalition, it is almost inconceivable that this test was planned by the current government. More likely, it was part of India's ongoing nuclear program and had already been under way under the previous governments.

Still, the benefits to the party are clear. India's nuclear program is popular with voters, seen as a necessary bulwark against China and Pakistan. And since the United States reacted harshly by slapping on sanctions, it is likely to unite Indians against America's perceived hypocrisy.

Tahir Hussein, a 30-year-old driver, summed up the prevailing public opinion: "It's all about power, and about our safety. We wouldn't use it against other countries, but we need to show them we are powerful."