Iran's supreme leader Ayatollah Ali Khamenei has welcomed comments by U.S. President Barack Obama pushing forward diplomacy and not war as a solution to Tehran's nuclear ambition, Iran's state TV reported on Thursday.

The report quotes Khamenei as praising a recent statement by the U.S. president saying he saw a "window of opportunity" to use diplomacy to resolve the nuclear dispute.

Open gallery view Iran's supreme religious leader Ayatollah Ali Khamenei Credit: AP

It is one of the rare cases in which Iran's top leader praised an American leader.

However Khamenei said the West's sanctions on Iran would fail.

The U.S., Israel and their allies suspect Iran is trying to build a nuclear weapon, a charge Iran denies.

On Tuesday, Obama met with Prime Minister Benjamin Netanyahu and told him that he believes there is time for diplomacy with Iran. However, he did reiterate to Netanyahu that the U.S. is not taking any options off the table, including a military option.

Meanwhile, Netanyahu has been trying to garner Obama's support for tougher talk on Iran, and a U.S. commitment to warn against an attack on Iran, should the Islamic Republic cross certain "red lines."