Iran was last night urged by America to learn the lessons of constructive diplomacy following the successful conclusion of an international deal to end North Korea's nuclear programme.

Condoleezza Rice, US Secretary of State, told reporters in Washington: "Why should it not be seen as a message to Iran that the international community is able to bring together its resources, particularly when regionally affected states work together and that the strong diplomacy. . . has finally achieved results?"

Iran, currently engaged in a war of words with America over allegations it supplied weapons to insurgents in Iraq, has steadfastly refused to bow to international pressure to give up its nuclear ambitions.

Yesterday in Beijing, more than three years of difficult talks between North Korea, South Korea, Russia, China, Japan and America were concluded and came just four months after Pyongyang shocked the world by testing a nuclear bomb.

While some details still have to be worked out, the deal means North Korea will close its main nuclear reactor in return for fuel aid.

In addition, the US and Japan have agreed to begin talks on building ties with the Communist state, once labelled by George W Bush as part of the "axis of evil".

Last night, the White House appeared cautiously optimistic, describing the agreement as "a very important first step" toward ending all of Pyongyang's nuclear capabilities. The US president said the talks represented "the best opportunity to use diplomacy to address North Korea's nuclear programmes".

Officials from the Communist state did not formally comment but its government-run media said the talks were held in a "sincere atmosphere" and were aimed at finding ways to rid the Korean peninsula of nuclear weapons.

Chun Yung-woo, South Korea's Assistant Foreign Minister, hailed the deal as "a new milestone in denuclearising the Korean peninsula".

The agreement involves North Korea closing its main Yongbyon nuclear reactor and allowing UN inspectors back into the country within 60 days.

In return, it will receive initial aid equal to 50,000 tons of heavy fuel oil.

However, key issues still remain to be resolved, most notably removing Pyongyang's current nuclear stockpile.

Full compliance by North Korea would bring it 1 million tons of heavy fuel oil worth around £150m and other aid plus talks on normalising relations with Washington, removing it from its designation as a terror-sponsoring state and ending US trade sanctions.

"If they don't abide by the terms," warned Tony Snow, White House Press Secretary, "they don't get the benefits they desire."