Chinese President Xi Jinping says China has always helped Pakistan when it is in need and "the Chinese people will always stand by the Pakistani people."
In a televised address to Pakistan's parliament on April 21, the visiting Chinese president praised Pakistan and painted a picture of a special partnership between Beijing and its closest ally in South Asia.
In one of several allusions to Islamic militants and other security threats, Xi said the countries are linked by "similar suffering" and "shared struggles that have brought our hearts and minds together."
He praised Islamabad's counterterrorism efforts, saying China will "never forget" that Pakistan has "contributed greatly" to security along China's western border.
China is a leading arms supplier to Pakistan and has sought its help combating anti-Chinese Islamic separatists reportedly hiding in Pakistan's lawless tribal areas.
Xi is on a two-day visit to Pakistan.
Pakistani lawmakers punctuated Xi's speech with polite applause and table-thumping, and gave him a standing ovation at the end.
Military leaders and foreign ambassadors also attended the speech, which was shown live on state television.
On April 20, he and Pakistani Prime Minister Nawaz Sharif signed agreements to begin building the China-Pakistan Economic Corridor (CPEC), a network of roads, railway and pipelines linking western China with Pakistan's Arabian Sea coast.
The corridor is part of China's aim to forge "Silk Road" land and sea ties to markets in the Middle East and Europe.
They launched energy and infrastructure projects valued at about $46 billion.
Pakistani Minister for Planning and Development Ahsan Iqbal said up to $37 billion of that would be spent on Pakistan's troubled electrical grid.
Iqbal said projects worth $28 billion were ready to be rolled out, while it will take three to five years for the rest of them to take start.
In his speech, Xi said such deals would bolster Pakistan's economy.
China and Pakistan have long maintained close political and military relations, based partly on mutual antipathy toward their common neighbor India.
But China and India have improved their ties recently, and Xi's visit appeared aimed in part to reassure Pakistan.
Xi called Pakistan a "great neighbor and a great friend" and said the countries share an "all-weather friendship."
The Chinese president had planned to visit last year but postponed the trip due to anti-government protests in Pakistan, and instead traveled to India.
Indian Prime Minister Narendra Modi is expected to visit Beijing in the coming weeks.