US President Barack Obama has signed legislation aimed at blocking Iran's chosen ambassador to the United Nations, but says he is only treating it as guidance.

The unusual legislation bars anyone from entering the US as a UN representative if they have engaged in espionage or what it calls "terrorist activity" and still pose a threat to US security, the AP news agency reported.

The measure is aimed at preventing Hamid Aboutalebi from entering the US. The Iranian government's preferred envoy is accused of involvement in the 1979 takeover of the US Embassy in Tehran.

Obama says he shares politicians' concerns that "terrorists" could use diplomatic cover to enter the US, but he says he will treat the legislation as advisory out of concern it could interfere with his ability to receive ambassadors.

The White House has said Aboutalebi was an unacceptable choice and the Obama administration has refused to grant him a visa.

The veteran diplomat has admitted that he acted as an interpreter for the group which held the hostages.

Iran dismissed the decision to deny Aboutalebi a visa, saying it would take up the case directly with the UN.

"We do not have a replacement for Mr Abutalebi and we will pursue the matter via legal mechanisms anticipated in the United Nations," Abbas Araghchi, a senior Foreign Ministry official and top nuclear negotiator, was quoted by Iran's official IRNA news agency as saying.

Source: Agencies