NEW DELHI — After 20 Indian soldiers were killed in the first deadly clash with Chinese troops in decades, India faced a dilemma. Could it retaliate against its more powerful neighbor?

Military action held obvious risks, including a dangerous escalation between two nuclear-armed nations. Some called for an economic boycott instead, urging ordinary Indians and companies to shun Chinese goods.

Now India is facing an uncomfortable truth familiar to governments around the world: It’s difficult to disentangle from China.

In wide-ranging goods such as cars, cellphones and medicine, Chinese components are a crucial part of Indian supply chains. Even bulletproof vests used by Indian soldiers are made with material imported from China.

India’s economic relationship with China was in the spotlight even before the June 15 clash high in the Himalayas. The pandemic had already prompted Indian Prime Minister Narendra Modi to launch a high-profile campaign for “self-reliance” — aatmanirbharta in Hindi — in which he urged Indians to buy local.

Reducing India’s reliance on China won’t be easy. The economic relationship between the two countries, like the military one, is asymmetrical. China is India’s second-largest overall trading partner and its biggest source of imports. India, by contrast, does not figure in China’s top 15 trading partners and is even lower on the list of sources of imports.

An economic boycott by India of Chinese products would not even “amount to a decent slap,” said Manoj Joshi, a fellow at the Observer Research Foundation in Delhi who has researched China’s global trade ties.

Meanwhile, the situation at the disputed border between the two countries remains precarious, with troop buildups on both sides. Talks to ease the tensions are underway at the military and diplomatic levels; earlier this week, the Indian army said there was a “mutual consensus to disengage” from “all friction areas.” China said the two sides had agreed to “lower the temperature.”

But neither country provided any details and they continued to condemn each other for instigating the violence. Some analysis of satellite imagery suggests that China has not retreated from its positions near where the deadly clash took place in the Galwan valley, but rather fortified them. (China has said that there were “casualties” in the conflict but has not confirmed how many of its soldiers were injured or killed.)

Experts say the clash — the most serious between the two countries in more than 50 years — marks a turning point. “There’s no trust right now,” said Tanvi Madan, the director of the India Project at the Brookings Institution. “Nobody is going to buy this idea anymore that greater economic engagement is going to alleviate political strains” between the two countries.

Even as India faces a grim economic outlook, Modi has elaborated on his goal of self-reliance. “India will reduce its dependence on imports,” he said three days after the clash with China. Self-reliance also means that “we become [the] biggest exporters of the commodities that we now import,” Modi said.

Now there are signals that India is preparing to make it harder for Chinese firms to do business in the country. In recent days, e-commerce platforms have been told to label their products with the country of origin, Bloomberg News reported this week; a government procurement site has told sellers to do the same thing. Both steps are viewed as attempts to reduce imports of Chinese goods.

In April, the Indian government announced that it would review all foreign direct investments by Chinese companies rather than allow them to proceed through an automatic route.

One important test of India’s shifting stance will come in the telecom industry. Nearly 40 percent of India’s electronic-equipment imports come from China, while Chinese brands dominate the smartphone arena, capturing 72 percent of the market last year. India is among those countries mulling whether to allow China’s Huawei Technologies to build its next-generation 5G mobile networks, something that now looks highly unlikely.

Another striking example of China’s role in Indian supply chains came in the days after the Galwan clash. S.C. Kansal, managing director of SMPP, a firm that was awarded a major contract to make more than 100,000 bulletproof jackets for the Indian army in 2018, told the Indian Express newspaper that the company was reliant on imports of materials from China to make its products.

The company “will move with the mood of the country,” Kansal added. “If required, we will look at alternative routes.” Kansal declined to respond to further questions.

Mohinder Kumar Gupta is the managing director of Star Wire, an Indian firm that makes bulletproof vests for Indian paramilitary and police forces. His company, too, sources a raw material for its products — high performance polyethylene — from China. A similar input is available from Europe or the United States, albeit at a higher price.

His company uses Chinese suppliers “only for economic reasons,” Gupta said. If the government tells the firm to do otherwise, it will shift its approach. “We’re all very keen” to do so, he said.

India’s pharmaceutical sector, a major player in the global generic drug industry, is also deeply dependent on China. About 70 percent of the active ingredients used by drugmakers comes from China, according to Ashok Kumar Madan, executive director of the Indian Drug Manufacturers’ Association. Long before the conflict, India was looking to decrease that reliance, but there is no easy or quick route to achieve that goal.

To make the active ingredients, you need the starting materials, Madan said. And “that is an arena where, again, you have to look to China.”

For some trade experts, India’s heightened attention to its dependence on China is overdue. Biswajit Dhar, a former Indian trade negotiator, said that even as the economic relationship between the two countries has expanded over the past decade, he sees a troubling trend.

The economic exchanges between India and China remind him of colonial-era patterns of trade, Dhar said, where India largely exported raw materials while importing higher-value intermediate and final products. “If you consider the division of labor, then China is certainly on the winning side,” he said.

Especially in two key areas — telecoms and pharmaceuticals — the government “must put in place a medium-term strategy to get out of this kind of dependence” on China, Dhar said. It is “absolutely imperative.”

Niha Masih contributed to this report.