India and China have agreed to peacefully settle their border tensions in the Himalayas through diplomatic and military channels.

“Both sides agreed to peacefully resolve the situation in the border areas in accordance with various bilateral agreements and keeping in view the agreement between the leaders that peace and tranquility in the India-China border regions is essential for the overall development of bilateral relations,” India’s foreign ministry said in a statement on Sunday after bilateral talks between the two countries.

Thousands of soldiers from both sides have been locked in a standoff in the remote region of Ladakh since last month. India is building a strategic road through the Galwan Valley in Ladakh and connecting the region to an airstrip, the Associated Press reported — a move China opposes.

Military commanders from both sides met on Saturday in Chushul, a village in the Leh district of Ladakh, near the disputed border. While India said the meeting took place in a “cordial and positive atmosphere,” China did not immediately respond. Beijing has on multiple occasions described the border situation as “stable and controllable.”

An amicable resolution to the dispute is likely as neither side wants to see an escalation in the tensions, according to Eurasia Group’s South Asia analyst, Akhil Bery.

After India and China fought a war in 1962, there had been only a single death, in 1975, at the Line of Actual Control (LAC) that delineates each country’s territorial claims, he told CNBC’s “Squawk Box” on Monday. The LAC is the defacto Sino-Indian border.

India has started building more infrastructure on its side of the border, which has antagonized China, Bery added.

“Another reason is that when India abrogated Article 370, which removed the state of Jammu and Kashmir’s special status, (India’s) Home Minister Amit Shah did say that India considers Aksai Chin a part of its own territory,” he said.

India and China are embroiled in border disputes over two large areas, and one of them is Aksai Chin. New Delhi sees it as part of the union territory of Ladakh that makes up parts of the greater Kashmir region, a disputed territory between India and Pakistan. Beijing believes Aksai Chin belongs to China and currently controls it.

“So, that probably played into some of China’s sensitivities, especially as it’s looking to assert itself more with territorial claims,” Bery added.

Analysts have said that India does not have the economic and military strength to follow the U.S. and adopt an anti-China stance. Particularly on the military front, New Delhi has some catching up to do because it did not invest as much into the sector as China did over the years, according to Bery.

However, India has other diplomatic options to keep the pressure on China by reaching out to allies like the United States, Australia and Japan.

“That’s what we call the quad,” Bery said about the four countries, adding that they are “looking to secure a free and open Indo-Pacific.”

“While India may not have the military capabilities to match China at the moment, it is certainly working on its diplomatic efforts to help contain China that way,” he added.

China and India, the world’s two most populous countries, established diplomatic relations 70 years ago.

While Beijing is one of New Delhi’s top trading partners, the balance between the countries lies in China’s favor. India imported more than $57 billion worth of goods from China between April 2019 to January this year, and exported only around $14 billion worth of products, Indian government data showed.