Iran has agreed not to keep enriched uranium on its territory that could be used to produce a nuclear weapon.