Three years ago, U.S.-Indian relations seemed destined to falter. U.S. President Donald Trump’s “America first” agenda, which asks what every American partner has done for the United States lately, had strained relations with many traditional U.S. allies. But his agenda seemed especially incompatible with India’s expectation that it would continue to benefit from American largesse—particularly in the form of diplomatic support and generous technology access—despite resisting the reciprocal obligations that come with a formal alliance.

Yet three years into Trump’s presidency, the strategic partnership with India that successive U.S. administrations have cultivated as a silent bulwark against China hasn’t just survived—it has flourished. Indian Prime Minister Narendra Modi and Trump have met on numerous occasions and even appeared together last September at a “Howdy Modi” rally in Houston, Texas, that drew 50,000 Indian Americans. Trump’s planned visit to India next week will feature a public extravaganza on an even grander scale, showcasing the leaders’ chummy personal relationship and the deepening ties between their respective nations.

Modi’s courtship of Trump was part of a considered strategy to keep the United States committed to India. Whereas many other world leaders reacted to Trump’s election in 2016 with bewilderment and horror, the Indian prime minister sought to charm and disarm his impulsive American counterpart. In public, Modi lavished attention on Trump and wrapped him in trademark bear hugs. In private, he patiently parried Trump’s demands on everything from Afghanistan to India’s peace process with Pakistan to bilateral trade with the United States. In so doing, Modi signaled that the United States was of vital importance to India and sought to persuade Trump that even an asymmetrical U.S.-Indian partnership could be mutually beneficial. And Trump seems to have bought it, given his boast that Modi promised him a boisterous welcome by “seven million people” in the Indian prime minister’s home state of Gujarat.

Modi’s success in keeping the United States’ attention was undoubtedly aided by fortuitous developments in Washington. The Trump administration’s focus on great-power competition, its designation of China as a strategic competitor, and its pursuit of a “free and open Indo-Pacific” all gave India renewed importance. So did the U.S. president’s desire to sell more American goods abroad. Since taking office, Trump has authorized the release of several advanced U.S. weapons systems, including Predator drones and the Aegis integrated air and missile defense system—both of which India would have struggled to procure from a U.S. administration more fearful of provoking Pakistan or irritating China. The Trump administration has also granted India the same special trade status that NATO allies enjoy when it comes to licensing requirements for high-end defense-technology sales.

India and the United States are far from becoming formal allies. They are dogged by persistent trade disagreements, which India shows no inclination to settle. But given Trump’s record with other U.S. allies, his administration has been surprisingly lenient when it comes to India’s uncompetitive trade practices. It has also kept mum about India’s feared drift toward illiberalism, enabling both countries to push ahead on strategic, especially defense, cooperation, which has always been the lodestar that guides U.S.-Indian relations.

SHARED VISION, SHARED BURDEN

Commentators have devoted many column inches to parsing the differences between New Delhi’s and Washington’s visions for the Indo-Pacific. But these differences shouldn’t obscure important areas of convergence. India and the United States are both increasingly committed to maintaining a free and open Indo-Pacific. Both now seek to keep Asia’s continental and maritime spaces free from Chinese domination and to resist Chinese encroachment on the sovereignty, security, and economic activities of states in the region. This ideational convergence, deepened by two decades of accumulating trust between India and the United States, has enhanced the strategic partnership and set the stage for even closer cooperation in the future.

The growing U.S.-Indian defense trade has also strengthened the relationship between the two countries. India was once overly dependent on Russia for defense procurement, but in recent years, it has begun to purchase more high-tech defense goods from U.S. suppliers. As a result, New Delhi has had to contend with mounting Russian resentment and even implicit threats that Moscow will sell arms to China that are more capable than those it supplies to India. Yet New Delhi has managed these tensions skillfully enough to preserve decent ties with Russia even as it steadily increases its reliance on the United States for new military systems. Although it can’t accede to Trump’s demand that it sever defense ties with Russia entirely, India has managed to become an important market for advanced American weapons. Currently, India hopes to purchase U.S. antisubmarine and antitank warfare helicopters, advanced surface-to-air missiles, naval guns, unmanned aerial vehicles, and long-range maritime patrol aircraft. Deals for some of these may be announced during Trump’s visit next week.

The United States now conducts more military exercises with India than with any other non-NATO partner.

The defense trade between the two countries is not without limits. Weapons systems used to operate independently, making India’s traditional à la carte approach to arms acquisition sustainable. The Indian defense inventory could, for example, consist of French fighter jets, Russian surface-to-air missiles, Israeli unmanned aerial vehicles, and European radars. But in an era of networked warfare, the United States and European nations (and private suppliers) balk at integrating their systems with those provided by strategic rivals, such as Russia. Such considerations will either limit India’s acquisition choices or compel it to settle for incomplete integration, forgoing the benefits of fully networked military systems. India’s desire for defense-trade autonomy, in other words, is beginning to collide with the emerging realities of information-age warfare.

Even so, defense cooperation between the United States and India has steadily increased, reaching levels that would have been hard to imagine two decades ago. The United States now conducts more military exercises with India than with any other non-NATO partner. More important, both countries orient their exercises (bilaterally and with others) toward the unspoken objective of countering the emerging Chinese military threat in the Indo-Pacific. India now collaborates with the United States on intelligence collection, the monitoring of Chinese military operations, and a range of other activities that are for the most part quiet and deniable. In so doing, the Modi government has sought to preempt the kinds of complaints that Trump has made about U.S. allies that allegedly free-ride on U.S. defense expenditures. India is not a U.S. ally, but New Delhi has nonetheless moved proactively to pursue military activities that both advance its own interests vis-à-vis China and hold out the promise of reducing the burdens borne by U.S. forces in the event of future crises or wars in India’s extended neighborhood.

NOT THERE YET

For all the progress of recent years, much remains to be done for U.S.-Indian defense cooperation to reach its full potential. For starters, the Modi government needs to jump-start the flagging Indian economy. Slowing growth bodes ill for India’s capacity to modernize its military fast enough to both balance out China’s growing power in its neighborhood and expand defense trade with the United States. India’s woeful defense-procurement system also needs to be reformed. New Delhi treats defense acquisition as industrial and employment policy rather than as a mechanism for obtaining the military equipment its armed services need for operational success.

The Indian military also needs to change its mindset from a frontier defense force to an expeditionary one capable of projecting power beyond the subcontinent. Although it is competent and professional, it is still highly conservative. Its technology, doctrine, and tactics are all driven mainly by the need to defend India’s borders with China and Pakistan—making it a less capable U.S. partner when it comes to providing security across the wider Indo-Pacific.

More than anything else, however, the future of the U.S.-Indian defense relationship hinges on India’s ability to maintain prosperity, stability, and social cohesion at home. An India that is distracted by internal strife, domestic cleavages, and corrosive ideological confrontations will be unable to either grow rapidly or modernize its military fast enough to project power beyond the Indian subcontinent. On this score, the recent record of Modi’s government has been dispiriting. It would be tragic if India’s hitherto upward trajectory were to be derailed by bad domestic policies. As they mull this danger, however, both U.S. and Indian policymakers can take heart that over the last three years the U.S.-Indian strategic partnership has prospered unexpectedly—and to the benefit of both nations.