North Korean leader Kim Jong-il has vowed during a visit to China to try to revive stalled nuclear disarmament talks, Beijing media said in its first confirmation of the secretive trip.

"Kim said that the DPRK [North Korea] will work with China to create favourable conditions for restarting the six-party talks," Xinhua news agency reported, without saying whether he had made a firm commitment to return to dialogue.

Mr Kim's five-day visit, which ended on Friday, was shrouded in secrecy but was widely seen as an attempt to secure aid to shore up his country's crumbling economy.

China, which hosts the nuclear negotiations, was expected in return to press its ally to come back without preconditions to the talks which Pyongyang angrily abandoned in April 2009.

Xinhua, reporting Mr Kim's meeting with President Hu Jintao, said they agreed that "relevant parties" in the negotiations "should demonstrate sincerity and make positive efforts for pushing forward the six-party talks".

Pyongyang's official media separately confirmed that Kim had ended his visit but made no mention of the meeting with Mr Hu or nuclear issues.

"Party and state leaders and people of China accorded with utmost sincerity warm welcome and cordial hospitality [to Kim]," the Korean Central News Agency (KCNA) said.

In a separate statement carried on KCNA, Mr Kim sent a personal message of thanks to Mr Hu, describing China as a "friendly neighbour".

"It is my belief that the DPRK-China friendship deeply enshrined by the peoples of the two countries would grow stronger and develop generation after generation," he said.

A month after quitting the nuclear negotiations, the hardline communist North staged its second atomic weapons test - incurring toughened UN sanctions which further damaged its economy.

It is desperate to improve living standards and ease serious food shortages - worsened by a bungled currency revaluation - in advance of a possible power handover.

Mr Kim, who suffered a stroke in August 2008, is widely thought to be preparing for an eventual transfer of power to his youngest son.

Chinese state television broadcast footage of the Kim-Hu meeting, showing the 68-year-old North Korean leader looking frail and elderly with thinning hair.

South Korea's food aid to its neighbour has largely halted amid the nuclear standoff.

But the North has said it wants a lifting of UN sanctions and a US commitment to discuss a formal peace treaty before it returns to the talks grouping the two Koreas, Russia, China, Japan and the United States.

Prospects of negotiations have been further clouded by the sinking of a South Korean warship near the disputed border with the North on March 26.

Suspicions are growing that a North Korean torpedo downed the ship with the loss of 46 lives.

South Korean and US officials say Seoul's investigation into the sinking must be wrapped up before any moves to restart nuclear dialogue.

Koh Yu-Hwan of Seoul's Dongguk University said the trip came at a diplomatically sensitive time.

"The resumption of talks depends on the outcome of the investigation into the sinking," Koh told AFP. "But I believe North Korea is saying it is ready to return to the six-party forum any time."

China has given South Korea a detailed briefing on Kim's trip, a Seoul official said without elaborating.

Xinhua's report made no mention of new aid pledges, saying only that Chinese leaders promised to continue supporting North Korea economically.

- AFP