Xi, on a two-day historic state visit to "all-weather" ally Pakistan, addressed a joint session of Pakistan's parliament which is the first for any Chinese president.

Both China and Pakistan "share a common stake in security", Xi told parliament in a speech that was aired live nationally as he linked economic cooperation with security.

"Over the years Pakistan has overcome all kinds of difficulties and contributed greatly to the security and stability of China's western border areas and this is something that we shall never forget," Xi said.

He also praised Pakistan's anti-terror effort, saying that Islamabad has always stood at the frontlines in the fight against terrorism and has made huge sacrifices to that end.

Xi's comments came as Pakistan vowed to step up cooperation in tackling terrorism.

"We will fight together to eliminate the menace of terrorism. Our joint efforts against terrorism have succeeded so far, but we have to intensify the efforts to achieve our goals," Sharif told parliament.

"Our defence ties are strong; and they are poised to become stronger in the years to come," he added.

On Monday, the Pakistani premier termed China's security "as important to us as Pakistan's security" as the two countries upgraded their relations to "all-weather ties".

Interestingly, Xi's praise for Pakistan comes at a time when India is "extremely disappointed" with the country for letting 2008 Mumbai terror attack mastermind Zaki-ur Rehman Lakhvi walk free earlier this month.

India said the decision "eroded" the value of assurances repeatedly conveyed to it by Pakistan on cross-border terrorism.

Xi, also the General-Secretary of ruling Communist party, lauded Pakistan for standing with China from the earliest days of founding of the People's Republic of China and said Islamabad stood by Beijing at a time when the communist nation was isolated on the world stage.

He described Pakistan as China's "dependable" friend as he announced long-term support for the cash-strapped country's economic development.

The two countries should support each other's core interests, Xi said, noting that China firmly backs Pakistan's territorial integrity.

Latest News from World News Desk