WASHINGTON: President Barack Obama is marking the first anniversary of the Iran nuclear deal by warning the Trump administration that the accord can't easily be undone and is preferable to war.

Obama says the agreement is the product of years of work between Iran and six world powers, not just between the US and Iran. He says a diplomatic solution that keeps Iran from obtaining a nuclear weapon is preferable to an "unconstrained" Iranian nuclear program or another war in the Middle East.

President-elect Donald Trump, who takes office on Friday, vowed at times during the presidential campaign either to walk away from the deal or to renegotiate it.

Iran agreed in 2015 to limit its ability to enrich uranium in exchange for the removal of some international economic sanctions.