US President George W Bush has ended his visit to China with an appeal for greater religious and political freedom.
In a speech to university students broadcast live across China, he said America had proved that freedom did not bring chaos, and religious faith provided a moral core for a nation.
He said religious believers made good citizens, and dissent did not mean revolution.
As the president's Asian tour drew to a close, continuing good relations with China were not matched by progress with North Korea - branded part of the "axis of evil" by Mr Bush.
Life in America shows that liberty, paired with law, is not to be feared
George W Bush
The Pyongyang regime has rejected an offer of talks by Mr Bush as an insult.
In Beijing, a BBC correspondent travelling with Mr Bush emphasised Mr Bush's speech on democracy was extolling the virtures of the American way of life rather than criticising China directly.
The president faced tough questioning from students over Taiwan, which China regards as a renegade province.
Political change predicted
He reiterated Washington's commitment - strongly opposed by China - to help Taiwan defend itself if provoked.
"Life in America shows that liberty, paired with law, is not to be feared," Mr Bush told the students at Beijing's Tsinghua University, one of the country's top technical and engineering institutes.
Freedom would not bring chaos because "freedom means more than every man for himself", he said.
Deng's pragmatism allowed prosperity
He predicted political change in China, where elections had already been held at local level.
"Nearly 20 years ago, Deng Xiaoping said that China would eventually expand democratic elections all the way to the national level - and I look forward to that day," the US president said.
Following the speech, Mr Bush engaged in a good-humoured question-and-answer session with students, joking when asked if his daughters would ever come to study in China that they did not listen to him.
He remarked that there had been "amazing change for the better" since his last visit to China in 1975.
Breaking the ice
The president began Friday by meeting Prime Minister Zhu Rongji for talks on trade and he later had talks with Vice President Hu Jintao, tipped as the next Chinese leader.
Hu is poised to take over when Jiang steps down
On Thursday, he described his talks with Mr Jiang as "candid" and he gave no indication of progress on the key issue of arms technology proliferation.
The two sides did agree on a visit by the Chinese leader to the US in October together with an earlier visit by Mr Hu, and they restated their commitment to boosting relations and fighting terrorism.
Mr Jiang said for his part that he looked to a relationship based on "mutual respect".
If the visit appears to have achieved few concrete results, reports from the presidential banquet on Thursday suggest a much warmer atmosphere.
Mr Jiang danced with Mr Bush's wife Laura as well as National Security Adviser Condoleezza Rice and the wife of the US ambassador to American favourites such as "Moon River", played by a Chinese military band.
And, according to Mr Fleischer, he serenaded Mr Bush with the Italian aria "O Sole Mio", backed by an accordionist.
Meanwhile, the North Korean leadership described Mr Bush as a "politically backward child" when rejecting his offer of negotiations.
Mr Jiang danced with America's first lady
Dismissing the offer - made in South Korea earlier in the week - the North Korean foreign ministry said Mr Bush was bent on conquering the communist nation by "dollars or strength".
A spokesman, quoted on Friday by the country's official Korean Central News Agency, said: "We are not willing to have contact with his clan, which is trying to change by force of arms the system chosen by the Korean people."