China’s Xi Jinping must be working for President Donald Trump. Although New Delhi has moved closer to the U.S. in recent years, no Indian government would subordinate its policies to Washington. If the Modi government fails to act, however, it will be inviting blackmail and coercion by Beijing.

Indeed, the latest bloodshed in the Himalayas, in which the People’s Republic of China is widely seen as the aggressor, pushed Indian analysts to contemplate the desirability of forging a military alliance with America. Editorialized the Hindustan Times: New Delhi should “double down on its partnership with the U.S.… and be a part of any club that seeks to contain Chinese power.” Researcher Sushant Sareen suggested the choice was between reinforcing failure and making a new policy “which involves a much closer alliance with the U.S. and its allies.”

It’s an idea that may appeal to more than a few policymakers in Washington. How better to encircle the PRC than add some military bases in South Asia? Yet America’s objective should not be to collect another hapless defense dependent, which justifies its anemic military efforts by relying on a U.S. security guarantee. Rather, Washington should seek partners that cooperate with America to enhance American security, especially by increasing the size, sophistication, effectiveness, and reach of their own militaries.

Alliances should be a means to an end, not a popularity contest, like winning bragging rights by accumulating the most Facebook friends or online “likes.” Yet of late Washington has collected mostly ornamental allies, which add more burdens and obligations than benefits. Montenegro and North Macedonia, for instance, are geopolitical jokes that dilute NATO decision-making while adding to America’s obligations.

But even such stalwarts as Germany, Japan, and South Korea needlessly remain dependent despite decades as U.S. allies. All three believe that it is Washington’s job to protect them. Their primary responsibility is to agree to be defended, not to contribute to joint security by increasing efforts to match capabilities.

This behavior is corrosive. Although Washington’s foreign policy establishment is appalled by Trump’s sensible demands for increased burden-sharing, his perspective, however maladroitly expressed, reflects the common sense of average Americans who pay the bills. Why does most Pentagon spending end up as de facto welfare for rich friends who have more important priorities than defending their territories and peoples?

For instance, if Germany, Europe’s most populous and prosperous state, is concerned about national and continental security, why is Berlin spending only 1.38 percent of its GDP on the military and maintaining a military whose readiness seems to barely exceed that of Montenegro? When the Republic of Korea has 53 times the GDP of its northern antagonist, why is the former still reliant on America militarily? And with China growing more aggressive by the day, why does Japan continue to limit itself to a pitiful 1 percent of GDP for the military, expecting Washington to do the heavy lifting in any conflict with Beijing?

Those responding most hysterically to the president’s plan to bring home 9,500 U.S. troops from Germany failed to demonstrate that such a minimal reduction would leave Europe at risk and America’s allies were not capable of deploying sufficient force to deter Moscow, which so dramatically lags behind the continent economically. Washington policymakers seemingly view alliances as a means to defend other states, not the United States.

Taking a similar approach to India would be a serious mistake.

For decades no one would have imagined an alliance between Washington and New Delhi. India leaned toward the Soviet Union while the U.S. tilted toward Pakistan, especially during in the 1971 war that birthed Bangladesh. The result was a generally frigid American relationship with India. Washington’s reliance on Pakistan to arm the Afghan Mujahedeen and ineffective attempts to block New Delhi’s nuclear weapons program also damaged ties. But the Bush II administration abandoned the latter Quixotic effort, and the Obama and Trump administrations sought to further improve the relationship. Last year the U.S. and India conducted joint military exercises for the first time.

China’s increasingly disruptive rise is likely to accelerate this process. The PRC poses a huge challenge to New Delhi. Both modern states came of age at roughly the same time. Their original leaders, Jawaharlal Nehru and Mao Zedong, met in 1954, and shared an antagonism toward the United States. But their nations’ disputed border soon transcended ideology, leading to a brief war in 1962, which ended in a humiliating loss for India.

Nevertheless, at the time that didn’t appear to be a permanent military judgment. The two antagonists were roughly comparable in economic strength as well as population. Indeed, China had only recently emerged from the disastrous Great Leap Forward and was about to jump into the abyss of the Cultural Revolution. But a few years later came Deng Xiaoping and economic reform. Today the PRC enjoys an economy roughly five times the size of India’s. Using the purchasing power parity measure, China is still nearly three times as large.

The two nations’ relative military strength reflects Beijing’s economic advantage. The PRC developed nuclear weapons in the 1960s and today spends about three times as much on the military. Both governments faced challenges in modernizing numerous but technologically backward forces, but China is further along.

The International Institute for Strategic Studies observed that the People’s Liberation Army “is the world’s largest armed forces, with an increasingly modern, advanced equipment inventory,” though its operational effectiveness “remains hampered by training and doctrine issues.” In contrast, “India continues its military modernization, though progress in some areas remains slow.” For instance, “the overall capability of the conventional forces is limited by inadequate logistics, maintenance and shortages of ammunition and spare parts,” and “many equipment projects have experienced significant delays and cost overruns, particularly indigenous systems.”

India should not be in this position. Prime Minister Narendra Modi was elected in 2014 promising to deregulate the economy and accelerate other reforms. India appeared ready to overtake China and become the world’s fastest-growing economy. Unfortunately, while he adopted some positive steps, he also intensified state control, discouraging entrepreneurship, and demonetized the economy, wrecking small enterprises. He won election last year mostly by appealing to increasingly violent Hindu nationalism.

Now nationalism has turned into blowback, as angry Indians criticized him for failing to protect the score of soldiers killed and even more wounded. While advancing its geographic control China responded with contemptuous neglect, barely mentioning the controversy in state media. Beijing views India as a second-rate laggard, not an equal and incipient great power.

Modi should act while the public is angry and willing to accept painful economic reforms. Indeed, the moment is propitious, with calls for a boycott of China rising in India and the U.S. and Europe looking to diversify supply chains. Why not encourage the West to invest in democratic India, filled with well-educated English speakers? Action is required on both sides, however. The Trump administration’s sustained campaign against trade and immigration have penalized India. Worse are New Delhi’s dirigiste rules that continue to hamper India’s economy. The country remains inhospitable to foreign investment. If Modi wants India to match the PRC, he should adopt policies to spur growth.

New Delhi also should propose greater security cooperation with America and other Western states. Manoj Joshi of the Observer Research Foundation predicted that “India will try to align closer to the U.S. and others also wanting to check China.” After the border clash Indian Defense Secretary Ajay Kumar said, “The decision to work together as independent partners is mutual and it reflects a vision shared at the highest political levels.” Arun Prakash, New Delhi’s retired chief of the naval staff, wrote that “India has a great deal to offer as a friend, partner, or even an ally.”

The most dramatic change would be allying with Washington. The Financial Times’ Gideon Rachman observed, “There are even hints that India may consider a formal alliance with the U.S. One Indian intellectual, close to the Modi government, observed pointedly last week that one reason China might feel free to kill Indian soldiers — but not Japanese or Taiwanese troops — is that Japan and Taiwan are sheltering under a U.S. security umbrella.”

A security guarantee, however, whether formal or informal, would be bad for Washington, reducing New Delhi’s incentive to upgrade its military. Like Europe, Japan, and South Korea, India would be tempted to avoid unnecessary political and economic costs and rely on America. Indeed, so long as U.S. officials constantly “reassure” allies that Washington will defend them no matter how little they do, they will never make a meaningful contribution to their own security.

There would be other downsides of a security guarantee. Being protected by a friendly superpower removes normal cautions and constraints. Although India certainly does not want war with the PRC, it might be more willing to risk one if it believed that Washington would back it up. Having New Delhi shelter “under a U.S. security umbrella,” as Richman put it, would greatly increase the dangers for Americans.

For instance, in 2008 President Mikhail Saakashvili, whose country, Georgia, was treated like an unofficial ally by the Bush II administration, apparently started bombarding Russian forces in the expectation that Washington was behind him. Years ago, when I visited Taiwan aides to President Chen Shui-bian, the first opposition leader elected president, they expressed confidence that Washington would defend the territory from China even if it was Taiwan that provoked a conflict.

Moreover, a formal anti-China alliance likely would spur countervailing Chinese behavior. Beijing could invest more in Pakistan and make concessions to enhance its relationship with Moscow. That could entangle America in an increasingly complex and volatile regional struggle well beyond a territorial dispute of little intrinsic importance and no security interest to the United States.

More important, an alliance would give Washington few benefits beyond those available from simply cooperating with New Delhi when their interests coincided. The simple existence of a more powerful and assertive India would make China more cautious.

Now, after the border fight, the Modi government has a strong interest in improving its military capabilities. And not just the army. The best way for Indians to counteract Chinese pressure would be to increase naval cooperation in East Asian waters. The PRC’s extensive territorial claims are at odds with the interests of Japan, the Philippines, Indonesia, Malaysia, and Vietnam. Helping these nations push back would raise the price paid by Beijing for its increasingly aggressive actions.

In terms of arms exports, of particular interest to the Trump administration, Siemon T. Wezeman of the Stockholm International Peace Research Institute noted that “India is now at that level where it’s basically like a NATO partner even if there’s no alliance.” Enhanced bilateral military relations also appear likely without a formal alliance. Even before the border clash, Indian Defense Secretary Ajay Kuman said, “To ensure peace, security and economic progress, it is critical for India to cooperate closely with the U.S.A.”

Nevertheless, India long has made clear that it does not want to become a tool of U.S. policy. New Delhi has good reason not to goad Beijing, a major power that always will be next door. Moreover, India retains a good relationship with Russia, from which it is purchasing S‑400 air defense system despite U.S. criticism.

Indeed, Subrahmanyam Jaishankar, India’s External Affairs Minister, observed with evident displeasure that “In the past, the U.S. said — listen, we are the world’s No. 1, we run an alliance, it’s global, there is one way doing business and it’s our way, so if you want to do business with us, sign here.” Which is all too true. Even in the best of times U.S. leadership often meant officious domination.

In contrast, Jaishankar said, today Washington is “much more open-minded beyond alliances.” Military cooperation is growing, without American hectoring over Indian behavior: as a result, “at the end of the day there is looseness and flexibility.”

The U.S. could encourage New Delhi’s defense efforts without a security guarantee. Washington could sell arms, provide training, and facilitate communication. Vitally important, however, is allowing India and other Asian states to lead, what Lindsey W. Ford and Julian Gewirtz, of the Brookings Institution and Harvard University, respectively, characterized as working “with Indo-Pacific partners on the issues that they prioritize and [providing] them significant space for independent action.”

Moreover, New Delhi need not work only with America. Discussions as part of the Quadrilateral Security Dialogue, with Australia, Japan, and the U.S., and the Indo-Pacific Coordination Group including South Korea, Vietnam, and New Zealand, previously broadened India’s security horizons. President Trump’s invitation that Modi join the upcoming G‑7 summit would expand opportunities for security cooperation. New Delhi also should enhance bilateral ties throughout the Indo-Pacific region.

The latest shootout between China and India comes at a propitious moment, reminding Beijing’s neighbors of the potential military dangers posed by the aggressive totalitarian state in their midst. Although it has been more than four decades since the PRC employed war to advance its ends — when China sought to “punish” Vietnam with only lackluster success — the risk of a similar misadventure today, only directed at Taiwan or a state involved in a territorial dispute, is rising.

Washington’s objective should not be a formal alliance system dependent on the U.S., but a cooperative coalition of states capable of constraining PRC adventurism. A nuclear-armed India with competent conventional forces and expanding navy reaching into the Pacific could be a keystone of such a system. America should welcome the possibility of today’s potential becoming tomorrow’s reality.