North Korea has agreed to disable its Yongbyon nuclear reactor and provide a complete declaration of all nuclear programs by the end of the year, in a deal that won praise from U.S. President George W. Bush.

Under the agreement reached between China, the two Koreas, Japan, Russia and the United States, the isolated state will get aid equivalent to nearly 1 million tonnes of heavy fuel oil and Washington will move toward taking it off a terrorism blacklist.

Details of the deal were released in Beijing on Wednesday after all parties had signed off on it and as the two Koreas held only their second-ever summit in the North.

The six-party talks, aimed at reining in North Korea's nuclear programs, had ended on Sunday to allow delegates to return to their home countries to discuss a joint statement with their governments.

"The DPRK (North Korea) agreed to disable all existing nuclear facilities subject to abandonment," the statement said, using the North's official name, the Democratic People's Republic of Korea.

"The DPRK agreed to provide a complete and correct declaration of all its nuclear programs ... by 31 December 2007," it added.

North Korea shut down and sealed its Soviet-era Yongbyon nuclear plant and allowed U.N. atomic energy monitors back to the site in July, its first steps in seeing through a breakthrough deal reached in February.

Pyongyang, which is so poor it cannot afford fuel to run factories, has in return received shiploads of heavy fuel oil and held bilateral talks with the United States that could bring the fortress state out of diplomatic isolation.

If approved by all six parties and carried out by North Korea, which carried out a test nuclear explosion last year, the agreement would mark another step toward the U.S. goal of getting North Korea to abandon its nuclear weapons programs.

"President Bush welcomes today's announcement, which outlines a roadmap for a declaration of the DPRK's nuclear programs and disablement of its core nuclear facilities by the end of the year," said Gordon Johndroe, spokesman for the White House National Security Council.

Under the deal North Korea was to receive 950,000 tonnes of heavy fuel oil or its equivalent. U.S. Assistant Secretary of State Chris Hill said on Wednesday that half of the total would be in fuel oil and the rest in improvements to its electricity infrastructure and to its fuel storage capacity.

Japanese Chief Cabinet Secretary Nobutaka Machimura joined Washington in hailing the agreement, saying: "Finally it has become what Japan can value."

But how it works out in practice is open to question.

North Korea has repeatedly demanded that in return for disarmament other countries must commit to completing two light-water reactors left partly built when a previous disarmament deal fell apart at the end of 2002.

Producing plutonium for weapons is much more difficult with light-water reactors but the United States and its allies have been reluctant to leave North Korea with any nuclear capability.

NO SURPRISES

The summit in Pyongyang between North and South appeared strained on Wednesday as the South's president snubbed an invitation to stay another day and said North Korea still did not trust its neighbor.

Still, Seoul insisted the talks between Roh Moo-hyun and the North's reclusive leader Kim Jong-il had been a success and that they would issue a statement by lunchtime on Thursday.

At the request of the other five parties to the nuclear deal, the United States will lead disablement activities and provide initial funding. It will lead an expert group to North Korea within the next two weeks to prepare for disablement.

North Korea also reaffirmed its commitment not to transfer nuclear materials, technology or know-how, the statement added.

But the statement skirted the issue of when the country would be removed from a U.S. terrorism blacklist, one of Pyongyang's key demands, saying only that Washington would fulfill its commitments to begin that process, in parallel with action on the ground.

Last week, Bush authorized $25 million in aid for the North, which would cover the cost of up to 50,000 tonnes of heavy fuel oil.

China and South Korea have delivered initial fuel shipments and Russia is expected to do so too. But Japan has indicated it will not participate unless North Korea addresses the issue of Japanese citizens the North abducted in the 1970s and 1980s.

(Additional reporting by Teruaki Ueno in Tokyo, and Langi Jiang in Beijing)