NEW DELHI — India and the United States signed a pact Tuesday to share geospatial intelligence, paving the way for deeper military cooperation between the two countries as they confront an increasingly assertive China.

The agreement will give India’s armed forces access to a wealth of data from U.S. military satellites to aid in targeting and navigation.

The two countries signed the accord in New Delhi during a visit by Secretary of State Mike Pompeo and Defense Secretary Mark T. Esper a week before the U.S. presidential election.

The partnership between the two countries is particularly important “in light of increasing aggression and destabilizing activities by China,” Esper told reporters Tuesday during an outdoor news conference where all the officials wore masks.

Esper called the signing of the information-sharing agreement a “significant milestone” and said the relationship between the United States and India is “strong, resilient and growing.”

The agreement is the latest example of how India and the United States — the world’s two largest democracies — are drawing closer together to respond to the challenge of China’s rise.

For India, that challenge is no longer theoretical. In June, India and China engaged in their deadliest clash in more than 50 years high in the mountains near the unofficial border between the two countries. Twenty Indian soldiers died, while the number of Chinese casualties remains unknown.

India and China are still locked in a dangerous standoff, with tens of thousands of troops preparing to wait out the harsh Himalayan winter.

“The United States will stand with the people of India as they confront threats to their sovereignty and to their liberty,” Pompeo told reporters, referring to the clash with China.

Pompeo and Esper’s Indian counterparts were more circumspect. Neither mentioned China by name but alluded to the tensions. “Upholding the territorial integrity and the sovereignty of all states” is essential, said Rajnath Singh, India’s defense minister.

The crisis on the border with China comes as India is battling the second-largest coronavirus outbreak in the world and struggling to resuscitate its ailing economy.

The United States views India as a counterweight to China’s growing ambitions in Asia, together with traditional U.S. allies in the region such as Japan and Australia.

India is unlikely ever to become a formal ally of the United States, given its long commitment to strategic independence, but there is no question that the security partnership between the two democracies has intensified.

Sales of military equipment by the United States to India have now touched $20 billion. Last year, the two countries conducted joint military exercises involving all three branches of their respective armed forces for the first time.

In recent years, India and the United States have also signed two major agreements regarding logistical support and secure communications between their militaries. Such agreements form the legal backbone of defense cooperation between the United States and dozens of countries.

On Tuesday, India and the United States signed the final such agreement — the Basic Exchange and Cooperation Agreement, or BECA — on the sharing of geospatial intelligence.

The completion of the pact, which was under negotiation for years, will allow the sharing of sensitive information and enhance the ability of the two militaries to work together, said Arvind Gupta, India’s former deputy national security adviser.

In the past, he said, some Indian policymakers had misgivings about forging such agreements with the United States, but now such criticism has all but disappeared. “We have crossed the hump of uncertainty on both sides,” Gupta said.

Both Indian and U.S. experts said they expected that momentum to continue regardless of the outcome of the presidential election. President Trump has lavished praise on Indian Prime Minister Narendra Modi, a fellow right-leaning nationalist whose policies alarm minority groups. The two men have even addressed large rallies together, first in Texas and later in Modi’s home state of Gujarat.

Despite such displays of friendship and the convergence between the two countries on matters of defense, the relationship remains troubled by persistent trade frictions. Trump has criticized what he has called India’s unfair trade practices and withdrew preferential tariff-free status for certain Indian imports.

The Trump administration “to its credit, has substantially advanced security and defense ties with India,” said Alyssa Ayres, a senior fellow at the Council on Foreign Relations who has provided outside advice on foreign policy to the Biden campaign.

Such progress has built on previous advances made by both Democratic and Republican presidents, Ayres said. There’s a “bipartisan consensus on the importance of this relationship, and that’s really quite valuable.”