Media playback is unsupported on your device Media caption The BBC's Chloe Bugelly: "The refusal to issue the visa has sparked anti-US protests in Tehran"

Iran has insisted it will not replace its new envoy to the UN in New York and accused the US of acting illegally by refusing a visa to the diplomat.

A senior Iranian official said they would "pursue the matter via legal mechanisms" with the United Nations.

The US accuses Hamid Aboutalebi of links to the group that seized the US embassy in Tehran in 1979, an incident that soured ties between the countries.

Mr Aboutalebi says that he only acted as a translator for the group.

Congress passed a bill last week that would allow the US to refuse an ambassadorial selection if the candidate posed a security risk.

Earlier this week, Iranian Foreign Minister Mohammed Javad Zarif condemned the move by Congress.

Image copyright AFP Image caption The hostage crisis was part of Iran's 1979 Islamic Revolution

He characterised those in favour of the bill as "a group of radicals" and said the move would not influence Iran's policies.

Although the bill still requires the signature of the president before it can become law, Congress appears to have succeeded in getting Mr Aboutalebi barred.

"Americans of a certain age will not forget their bitter anger at watching 52 countrymen paraded, bound and blindfolded, through the streets of Tehran, nor the endless anxiety felt while the American diplomats were held prisoner for 444 days" Washington Times Aboutalebi: Let him into the US?

White House spokesman Jay Carney said the president "shared the intent of the bill", and would not issue a visa.

Mr Babaei said the White House decision was "in contravention of international law, the obligation of the host country and the inherent right of sovereign member states to designate their representatives to the United Nations".

Under international law, the US as the host nation for the UN is obliged to grant visas to states' representatives.

In the most high-profile similar case, the US refused a visa to Palestinian leader Yasser Arafat to speak at the UN in 1998. The UN condemned that decision.

The UN has not yet commented on Mr Aboutalebi's situation.

Mr Aboutalebi has previously served as Iran's ambassador to Belgium, the European Union, Italy and Australia.

He has said said he was not part of the group that took over the US embassy, and was only later asked to translate for the students.

The 52 Americans were held for 444 days during the crisis.

The hostage crisis was part of the revolution that overthrew Iran's monarchy and installed the Islamic republic.