China is ready for a final settlement of its border disputes with India and prepared to invest more in the South Asian nation if trade rules are eased, Foreign Minister Wang Yi said June 9 in New Delhi.

“Through years of negotiation, we have come to an agreement on the basics of a boundary agreement, and we are prepared to reach a final settlement,” Wang told reporters in the Indian capital near the end of a two-day visit that included a meeting with Prime Minister Narendra Modi.

India and China, home to more than a third of the world’s population, are seeking to prevent their territorial disagreements from affecting economic ties. China is increasingly asserting its territorial claims in disputed waters off its eastern coastline, raising tensions with Japan, Vietnam and the Philippines.

“The Chinese are prepared to renew their ties with the Indians in a much more positive way,” said Hoo Tiang Boon, a research fellow at the S. Rajaratnam School of International Studies in Singapore.

“They understand that right now foreign relations in East Asia aren’t exactly ideal,” he said. “The last thing they want is their western flank to create problems for them as well.”

China is India’s largest trading partner and their combined trade was $49.5 billion in the April-December period, according to Indian government data. The two nations are home to one-third of the world’s population.

Chinese companies would be prepared to invest in developing Indian infrastructure, including high-speed train networks, and the nation’s manufacturing sector with more attractive regulations, Wang said. The two countries agreed to relax visa rules to boost tourism during his visit, Wang said.

“China-India cooperation is like a massive buried treasure waiting to be discovered,” Wang said. “The potential is massive.”

The Chinese government may be motivated to resolve tensions with India as Chinese relations with Japan and Southeast Asian nations such as Vietnam and the Philippines have deteriorated in recent months over other territorial disputes.

Modi, elected prime minister in May, has accepted an invitation from Chinese Premier Li Keqiang for an early visit to Beijing, Modi’s office said on June 9.

India accuses China of occupying 38,000 sq. km of territory in Jammu and Kashmir, while the government in Beijing lays claim to 90,000 sq. km of land in the Indian state of Arunachal Pradesh.

India and China have both made claims to territory held by the other and clashed during a brief border conflict in 1962.

The potential for hostilities was highlighted last year when India alleged Chinese troops had crossed into Indian-held territory in Ladakh. The incident, the most serious dispute between the neighbors in a quarter of a century, triggered a three-week escalation in tensions ending with an agreement negotiated by army commanders.

Modi in his election campaign this year promised to take a harder line on protecting India’s borders with China than his predecessor as the two nations aim to end troop clashes that have hobbled their relationship for the last five decades.

Modi warned China to drop its “territorial mindset” in February and said his country’s weakness had encouraged the Chinese Army to enter Indian territory last year.

“With China, Modi will be trying to balance trying to win their investment for things like infrastructure projects, and at the same time trying to reinforce the borders,” said Srikanth Kondapalli, a professor in Chinese studies at Jawaharlal Nehru University in New Delhi.

Indian Foreign Minister Sushma Swaraj met Wang on June 8 for more than three hours, said Syed Akbaruddin, an Indian Foreign Ministry spokesman. The top diplomats talked about increasing Chinese investment into Indian industrial parks, he said.

“Both the leaders felt there was a tremendous untapped potential for growth of economic ties,” Akbaruddin said, adding that “everything” was discussed, including countering terrorism. “China is a neighbor with whom we share a long border. Our neighborhood is a major focus of our government.”

In his press briefing on June 9, Wang said, “We regard each other as a priority and each other’s development as an opportunity.”

Modi’s first trip abroad will be to Bhutan later this month, followed by Japan in July and then the U.S. in September, according to India’s Ministry of External Affairs. Modi is also likely to attend a summit with leaders of China, Russia, Brazil and South Africa next month and the U.N. General Assembly in September.