Iran's Supreme Leader Ayatollah Ali Khamenei has said in a rare gesture that his country wants to have "friendly relations" with the US while thousands of militiamen listening to his address shouted in response "death to America".

In his remarks to tens of thousands of Basij militiamen, Khamenei said the US is like any other nation and Iran does not want to be hostile towards them.

He said: "We want to have friendly relations with all nations, even the United States. We are not hostile to the American nation. They are like other nations in the world."

This evoked a strong response from the audience.

Speaking hours before the nuclear talks between Iran and world powers in Geneva, Khamenei, who wields the ultimate authority in Iranian affairs, however, asserted his country will not buckle under western pressure.

"We do insist that we will not step back one iota from our rights. We do not intervene in the details of these talks. There are certain red lines and limits. These have to be observed. They are instructed to abide by those limits," said the Iranian leader.

Khamenei reserved stronger words for Israel, which he said, will be "doomed to extinction".

He also said the French government is "kneeling before the Israeli regime" pointing at Paris' hard-line position on Iran at the previous round of Geneva talks.

French president Francois Hollande had visited Israel earlier and assured Prime Minister Benjamin Netanyahu that Paris will oppose any move that will allow Iran to pursue its nuclear weapons programme.