Japan's Prime Minister, Yasuo Fukuda, has called for increased co-operation with China in the future, at the end of a four-day trip to the country.
Mr Fukuda called for co-operation after visiting Confucius' birthplace
Mr Fukuda said the neighbours could do more for the world by co-operating than each would achieve single-handedly.
Despite the remarks, earlier talks with his Chinese counterpart, Wen Jiabao, and President Hu Jintao did not resolve a dispute over maritime gas fields.
Mr Fukuda's visit to China was his first since taking office in September.
China refused high-level contact with Japan from 2001 to 2006 during the premiership of Junichiro Koizumi, after he made annual visits to the controversial Yasukuni war shrine.
Mr Fukuda has said he will not visit the shrine while he is in power and has called for Japan to be humble about its past.
Speaking after visiting the birthplace of the philosopher Confucius in the eastern town of Qufu in Shandong province, Mr Fukuda said his trip to China had been "very meaningful".
"I had in-depth discussions with Chinese leaders and agreed that Japan and China can do more if they co-operate than each can do single-handedly," he told reporters.
The premiers agreed to co-operate on climate change and trade
"There will be nothing good for the region and the world unless Japan and China have co-operative relations," he added.
Before visiting Qufu, Mr Fukuda travelled to Tianjin to tour a Toyota car factory in the city.
He had earlier played a game of catch with Mr Wen Jiabao in Beijing following three days of talks aimed at improving Sino-Japanese relations.
The two men agreed to co-operate on climate change and trade, and to increase youth exchanges between their countries.
But despite 11 previous rounds of talks, no agreement has been reached on the two countries' territorial dispute over lucrative gas fields in the East China Sea.
China does not accept the maritime border which Japan has proposed as a starting point for negotiations. The two leaders agreed only to raise discussions to vice-ministerial level.