Foreign policy refuses to yield to the U.S. political calendar, and so, with Election Day looming in the U.S., this week the secretaries of defense and state escaped the Beltway for a whirlwind tour of the Indo-Pacific.

Their trip included stops at three key island states that straddle the world’s superhighways of maritime trade: the Maldives, Sri Lanka, and Indonesia.

In each country, the U.S. officials sought to elevate strategic and economic ties, and garner support for America’s vision of a free and open Indo-Pacific.

The real prize, however, was their first destination: India. In New Delhi, Secretary of State Mike Pompeo and Secretary of Defense Mark Esper celebrated the completion of a key military pact poised to bring the two democracies into greater strategic alignment.

While in the Maldives, Pompeo announced the U.S. would be opening its first embassy in the country, with a resident U.S. ambassador. To date, that role was filled by the U.S. ambassador to Sri Lanka serving double duty.

The Maldives has assumed greater strategic significance in recent years, as a new battleground state in a struggle for influence in the Indian Ocean. The current government in the Maldives has accused China of saddling the country with unsustainable debt and reinforcing the authoritarian tendencies of the previous government.

In Sri Lanka, Pompeo underscored the desire to enhance cooperation with the administration of President Gotabaya Rajapaksa, calling Sri Lanka a “powerful and strategic partner for the U.S. on the world stage.”

“It can be a beacon for a free and open Indo-Pacific,” Pompeo said.

In Colombo, Sri Lanka, he also drew sharp contrasts between the approach adopted by China and the U.S.

“We see from bad deals, violations of sovereignty, and lawlessness on land and sea that the Chinese Communist Party is a predator, and the United States comes in a different way,” Pompeo said. “We come as a friend and as a partner.”

Finally, in a country still grappling with ethnic and religious divisions just a decade after the conclusion of a bloody a civil war, Pompeo urged the Sri Lankan president “to take meaningful, concrete steps to promote accountability, justice, and reconciliation.”

In India, Esper and Pompeo held a “2+2” meeting with India’s top foreign affairs and defense officials, even as Chinese and Indian forces remain locked in a military standoff at their disputed border.

It was no mere photo opportunity. The two sides announced a new Defense Cyber Dialogue, the establishment of a permanent presence for the U.S. International Development Finance Corp. in India, and a decision to enhance cooperation on advanced defense technologies.

The key takeaway, however, was a consequential new military agreement, the Basic Exchange and Cooperation Agreement, which will allow India and the U.S. to share geospatial intelligence and satellite data for better accuracy of missiles and drones, among other things.

According to one report, it will also allow the U.S. to share with India “telephone intercepts, and data exchange on Chinese troops and weapons deployment along the 3,488-kilometer India-China [border].”

The Basic Exchange and Cooperation Agreement marks the fourth and final “foundational” military cooperation pact the U.S. has successfully pursued with India, and the third in four years following the signing of the Logistics Exchange Memorandum of Agreement in 2016 and the Communications Compatibility and Security Agreement in 2018.

Thanks to the former, Indian and U.S. warships are now refueling each other at sea. Due to the latter, the two countries can now share encrypted communications data and equipment.

It has been a stunning turnaround for a country once skeptical of U.S. efforts to forge closer defense ties. The relationship has been steadily developing since the turn of the century, but in the past several years, it has kicked into overdrive, thanks to three complementary dynamics.

The first is China. In recent years, India has felt increasingly threatened by China’s more nationalist tone and aggressive foreign policy.

As China’s footprint has expanded across India’s traditional backyard, in recent years, it has sparked several crises with India at their disputed border. Each provocation has provided an accelerant for India-U.S. relations and, as of late, China has been doing a lot of provoking.

An unprecedented standoff between Chinese and Indian forces on the Doklam plateau in the summer of 2017 helped prompt India to agree to the revival of the “Quad,”—the highly symbolic grouping of Australia, India, Japan, and the U.S.—in late 2017, and sign the Communications Compatibility and Security Agreement with the U.S. the following year.

An even more dire, still-unfolding crisis at the China-India border that began this May resulted in the first casualties at that disputed frontier in decades, likely helping to tip the scales toward completing the Basic Exchange and Cooperation Agreement this week.

While some of these initiatives might have developed organically and without China’s assistance, they almost certainly would have been slower across the finish line.

The second changing dynamic is the Indian government.

For a country whose foreign policy was once defined by the doctrine of “nonalignment,” India now finds itself very much aligned with the U.S., even as it continues to eschew formal treaty alliances.

Twenty years of expanding defense and economic ties have established a level of trust and comfort that evaded the two democracies during the Cold War.

The government of Prime Minister Narendra Modi, meanwhile, has shed many of the philosophical reservations about alignment with the U.S. harbored by its predecessors.

The third factor is the Trump administration, which has benefited from a seasoned and highly capable South Asia team in the National Security Council and the State Department, and at the U.S. Embassy in New Delhi.

To their credit, Pompeo and Esper have also made the India relationship a top priority, featured frequently in speeches and strategy documents as a cornerstone of the administration’s Free and Open Indo-Pacific Strategy.

Ahead of the 2+2 dialogue, Esper minced no words: “India will be the most consequential partner for the U.S. in the Indo-Pacific this century.”

For his part, in New Delhi, Pompeo noted: “Big things are happening, as our democracies align to better protect the citizens of our two countries and, indeed, of the free world.”

Pompeo also refused to play coy about the elephant in the room: “The [Chinese Communist Party] is no friend to democracy, the rule of law, transparency, nor to freedom of navigation.”

While the Basic Exchange and Cooperation Agreement was the main course, perhaps the most impressive takeaway from the 2+2 dialogue was the wide scope of convergence on display between the two democracies.

The joint statement issued by the two sides included everything from the Quad to COVID-19 pandemic response cooperation, supply chain resilience, cooperation in Afghanistan, multilateral peacekeeping, new quadrilateral naval exercises, infrastructure cooperation, and support for the Trump administration’s “Blue Dot Network,” a strategic energy partnership, a U.S.-India natural gas task force, civil nuclear cooperation, special forces cooperation, and working groups on cybersecurity, counterterrorism, counternarcotics, and space cooperation.

The two sides also hit all the right notes on the free and open Indo-Pacific, the rules-based order, transparency and the rule of law, and freedom of navigation, underscoring the convergence on many of the key geostrategic issues confronting the region.

Indian External Affairs Minister S. Jaishankar explained how the relationship not only served both countries’ national interests, but was more broadly “a force for good.”

“In that sense, [the relationship] is truly global, comprehensive, and strategic,” he said.

Since the George W. Bush administration, every U.S. government has identified India as a vital partner and swing state that will shape the balance of power in the Indo-Pacific. Every administration has made enhancing the strategic relationship with India a top priority.

In the past four years, the Trump administration has fulfilled that promise and taken the relationship to new heights, aided by a willing partner in New Delhi—and a Chinese government intent on threatening and alienating its neighbors.