When the Salvor, a U.S. Navy rescue and salvage ship, pulled into a port in India’s southeast this summer, the job at hand was patching up the aging vessel. But there was a bigger mission, too: opening another door for a U.S. military trying to stretch out across the Indo-Pacific and counter Chinese power.

The Navy ship was the third in a year to arrive at Kattupalli, an industrial hamlet north of Chennai with a state-of-the-art shipyard. And this time, the visit marked the start of a five-year ship repair agreement — a tangible step toward defense cooperation for two nations pushed together by geopolitics and Washington’s desire to court and strengthen a rising Asian giant.

“We’re well equipped to do this,” said Arun Ramchandani, the head of the defense unit of L&T, the Mumbai-based conglomerate that built the shipyard. “And I think that this is just the beginning.”

The deal, which includes another defense contractor in Mumbai, is part of a strategy the Pentagon calls “places not bases” — pursuing access to more sites where the United States has no military installations of its own. In the vast Indo-Pacific, such connections could prove important for deterring China and, in the event of a conflict, sustaining a U.S. mobilization.

Beijing has already strengthened ties with Sri Lanka and Pakistan by building or expanding ports through its Belt and Road initiative, while just over the past year, Washington has raced to catch up by signing new or expanded security arrangements with the Philippines, Japan, Australia, Palau, Papua New Guinea and Vietnam, in addition to India.

In some countries, the United States is lining up locations for ship or submarine repair and resupply. In others, it has gained access to strategic islands or sea lanes by agreeing to improve infrastructure and assist law enforcement with equipment, or by sharing information about threats at sea.

Greater defense cooperation with India — at the opposite end of the Indo-Pacific from American bases in Japan and South Korea — is an especially coveted prize for the United States, which hopes New Delhi will become both a military ally and an alternative to China for manufacturing and technology development. Under a shared defense road map, the two sides, among other initiatives, also announced a major deal on jet engines this year.

Still, both countries have a lot of bureaucracy, history and skepticism to overcome.

Under a 1920 merchant marine law that protects American shipyards from competition, for example, only noncombat ships can be repaired by other countries. New Delhi’s relative military weakness and long history of acting as a nonaligned nation may also limit its willingness to work with the United States in a military conflict. And with Indian agents now accused of orchestrating the killing of a Sikh separatist on Canadian soil, Washington is facing new questions about Indian reliability.

But Gen. Pat Ryder, the Pentagon spokesman, said the United States aimed to make India a logistics hub for the U.S. military and other partners in the Indo-Pacific, implying that the country’s ports could be useful in a potential war. And both countries see the ship repair deal as an exercise in reassurance, confirming that warmer relations are here to stay.

“What’s happened is the character of the relationship has changed — it has broadened, it has its benefits, but in implementation it has its huge challenges,” said Anil Ahuja, a retired lieutenant general in the Indian Army who has worked on U.S.-India military task forces. “We have to learn where to plug in.”

Concerns about China are driving the nascent partnership. New Delhi has become more anxious about Chinese submarines and ships moving between Africa and the subcontinent. Chinese research vessels also linger near India’s coast more often, Indian officials said, raising concerns about spying by Beijing.

For India, worries about China’s power at sea — and not just in the Himalayan region where China and India share a disputed border — have contributed to a wider awakening. At a kickoff meeting in September for U.S. and Indian officials pursuing defense innovations, the first design efforts focused on undersea communication and maritime intelligence.

“India sees Chinese hegemonic ambitions far more clearly now, while it refused to see them before,” said C. Raja Mohan, a senior fellow at the Asia Society Policy Institute in Delhi.

The United States and India have also found that at sea, where protecting commerce and shipping are widely shared interests, partnerships are less politically fraught. In international waters, the two navies increasingly practice passing maneuvers and tactical communication.

“There are fewer sensitivities in the maritime domain,” General Ahuja said. “You can hug and kiss each other in the middle of the sea and nobody cares.”

The ship repair agreement extends that bond to places like Kattupalli, where a container port and power plants rise from lush coastal flats about 20 miles from Chennai.

Built from scratch about a decade ago, L&T’s 900-acre shipyard has 2,000 workers who can build or repair several ships at a time. It can accommodate vessels weighing up to 20,000 tons, thanks to a ship lift that raises them in and out of the water and moves them to different areas, under cover or in the open air.

On a recent visit, several large patrol boats were being built, while a handful of commercial tankers bobbed in the water, awaiting repairs.

Here and at other locations, India and its defense companies have made clear they would like to do more work for the United States.

Last year, a delegation of congressional staff members visited a naval shipyard in Kochi, on the western coast, where officers showed off India’s newest aircraft carrier and pitched their port as a repair shop for warships working the Persian Gulf.

“They wanted to show us that they were really pressing forward and developing their own capabilities,” said Megan Reiss, a former national security adviser to Senator Mitt Romney who was part of the trip.

The Americans, while intrigued, also pointed out a perennial impediment: India’s reliance on Russian military equipment. The aircraft on the carrier were Moscow’s designs.

The White House has emphasized that India is heading in the right direction by buying less from Russia, lining up orders recently with the United States for drones, and building more weaponry by modernizing generic designs. Some U.S. officials have signaled that they hope India eventually replaces Russia as a supplier of conventional military hardware for countries that cannot afford American weapons systems.

Companies like L&T, which produces delivery systems for high-tech weaponry, believe that, with American support, they can find new ways to join global supply chains.

“The good thing about the Indian defense ecosystem is that it is innovative,” Mr. Ramchandani, the L&T executive, said.

But with some of its most useful and sensitive equipment, the United States has held back.

Undersea monitoring technology, for example, has become a source of tension. India wants more than American officials said they felt comfortable sharing — to avoid commingling with Russian tools or personnel, and to keep America’s own movements from detection by India.

In the meantime, there is Kattupalli. At least one more U.S. ship is expected this year. In most cases, shipyard managers said, they start preparations for the Americans up to 45 days early.

Even for logistics vessels, the demands can be intense. Americans need different food, and they expect a certain level of accommodation and security.

When the Salvor docked, other berths were kept empty. There were armed guards around the parking lot and an Indian Navy warship off the coast.

John Ismay contributed reporting from Washington.