India's new nationalist government promised on Monday to pursue a more muscular foreign policy and "engage energetically" with China as Prime Minister Narendra Modi met Beijing's top diplomat.
In a keynote speech before parliament that was written by Modi, Indian President Pranab Mukherjee said India wanted peaceful and friendly relations with all countries but would not "shy away" from confrontation when necessary.
He also said that Modi's newly-elected government was "committed to building a strong, self-reliant and self-confident India" that wanted to take its "rightful place in the comity of nations".
Modi, whose right-wing Bharatiya Janata Party (BJP) ousted the ruling Congress party last month after a landslide election victory, has long argued that India has been punching below its weight on the world stage and has lost ground to its nuclear-armed rival and neighbour China.
After promising to shore up relations with other South Asian countries which have forged closer ties to Beijing during the last decade of Congress rule, Mukherjee singled out China for mention in his speech.
"My government will engage energetically with other neighbours in our region, including China, with whom we will work to further develop our Strategic and Cooperative Partnership," he said.
The speech came before Modi and Chinese Foreign Minister Wang Yi held brief talks in New Delhi, officially billed as a "courtesy call".
Although there was no immediate word on the outcome of the talks, footage broadcast on Indian television showed the two men smiling and shaking hands.
Wang had met on Sunday his Indian counterpart Sushma Swaraj, talks described by New Delhi as a "productive and substantive" step towards stronger relations between the neighbours, whose ties have long been frosty over a border dispute.
"In our view, this is a productive beginning between the new government of India and the Chinese government," foreign ministry spokesman Syed Akbaruddin said.
Speaking in Beijing, a Chinese foreign ministry spokeswoman said that the Communist government "welcomes, supports and gives blessings to India's development".
"China is ready to develop a closer and more-comprehensive development partnership with India," Hua Chunying told reporters on Monday.
Modi invited Chinese President Xi Jinping to visit India later this year, extending an olive branch to one of New Delhi's traditional rivals.
Despite his reputation as a hardline nationalist, Modi has spoken of his admiration for China's economic growth in the last decade, and he made several trips to Beijing in his previous post as chief minister of Gujarat state.
In a speech in New Delhi on Sunday night, Modi said that India needed to up its game in order to compete with China.
"If India has to compete with China, the focus should be on skill, scale and speed," the prime minister said.
Modi faces a tough task of dealing with an increasingly assertive and well-armed China, which is looking to play a larger role in South Asia, while still trying to strengthen economic ties with Beijing.
China is India's biggest trading partner, with two-way commerce totalling close to $70 billion. But India's trade deficit with China has soared to more than $40 billion from just $1 billion in 2001-02, Indian figures show.
Relations are also still dogged by mutual suspicion -- a legacy of a brief, bloody border war in 1962 over the Indian state of Arunachal Pradesh, that is nestled in the eastern stretch of the Himalayas that China claims as its own.
In February, Modi had warned China to shed its "expansionist mindset" at an election rally in Arunachal Pradesh.
China hit back, saying it had "never waged a war of aggression to occupy any inch of land of other countries".
The neighbours have held a series of talks to try to resolve their border dispute, but the frontier still bristles with tension.
Ahead of the talks, Wang sought to play down tensions over their border, saying with "strong will and resolve, we will eventually find a solution".
"No country can choose its neighbour, but friendship may be fostered," he told the Hindu newspaper in an interview published Sunday.
China has been embroiled in a series of territorial and other disputes with its neighbours over the years.
Beijing is also involved in multiple other disputes in the South China Sea, and has a bitter row with Japan over islands in the East China Sea.