Pakistani President Pervez Musharraf has ended a three-day visit to China in which the two sides signed a number of agreements to improve relations.
Musharraf said China was a beacon to countries like Pakistan
However, they did not, as some observers had expected, finalise a deal for China to help build a nuclear plant in Pakistan.
Mr Musharraf's visit came during signs of growing friendship between China and Pakistan's arch-rival, India.
He has now flown to Seoul for talks with South Korean leaders.
President Musharraf's final day in China focused on talks with Chinese Defence Minister Cao Gangchuan and former President Jiang Zemin.
Mr Jiang is now head of China's Central Military Commission.
"We had an excellent time here in China," Mr Musharraf was quoted as saying by the Reuters news agency.
"We feel very much at home here in China."
However, correspondents say it was noticeable that the two sides did not put the finishing touches on an agreement for China to help in the construction of a nuclear power plant on the River Indus.
It would be the second nuclear plant that China has helped Pakistan to build.
A Chinese Foreign Ministry spokesman would only say that there was now a "consensus" between the two sides over the new plant.
A spokesman at the Pakistan embassy in Beijing said talk of the deal being concluded during Mr Musharraf's visit was "just speculation".
A wide range of agreements signed after Mr Musharraf met President Hu Jintao on Monday included:
- A $500m loan to Pakistan from China
- A preferential trade agreement
- An extradition treaty
President Musharraf also asked Chinese businessmen to invest in his country.
"The past belongs to Europe, the present belongs to the united States and the future belongs to Asia," he told business executives on Tuesday evening, the Associated Press news agency reports.
"China's economic miracle of the last 20 years is a beacon for all developing countries like Pakistan."