TEHRAN - Iranian President Hassan Rouhani said Sunday that he had no preference in the US election race between Hillary Clinton or Donald Trump, saying it was a choice between "bad and worse".

"At the UN, the leader of a country asked me which of the candidates I preferred. I responded: 'Do I prefer the bad over the worse, or the worse over the bad?" Rouhani said at a speech in Arak in central Iran. The moderate president said he was struck by the way in which the American candidates "accuse and insult each other".

"Do we want this kind of democracy in our country? This kind of election?" he asked.

He said "morality does not exist" in the United States "which pretends to have had democracy for 200 years".

Rouhani has sought to improve relations with the West, signing a nuclear accord last year with world powers that led to the lifting of sanctions and raised hopes that Iran would return to the international fold.

Trump has vowed to "tear up" the nuclear agreement and Iran's supreme leader Ayatollah Ali Khamenei responded that he would happily "burn" the agreement if that was the case.

Rouhani himself faces re-election in May 2013 and is set for a tough battle against conservatives who dislike his overtures to the West and say the nuclear deal has failed to bring significant economic benefits to Iran.