WASHINGTON (AFP) - President Barack Obama signed into law Friday a bill designed to bar Iran's pick for UN ambassador from US soil over his links to the 1979 American embassy hostage siege.
But Mr Obama also issued a statement saying that he would only regard the legislation as guidance, warning it could infringe upon his executive powers as president.
The spat over Hamid Aboutalebi's nomination has blown up amid a cautious thaw in relations between the US and Iran as Teheran's new leadership seeks to negotiate a nuclear treaty with global powers.
The United States said earlier this week that it would not issue a visa to Mr Aboutalebi because he was involved in the hostage crisis at the US embassy in Teheran.
The move followed outrage in Congress over his selection by Iran and reflected the extent to which the episode in 1979, which was seen as a humiliation for the United States, still challenges Mr Obama's efforts to improve relations with Teheran.
The law bars from US soil "any representative to the United Nations who the president determines has been engaged in terrorist activity against the United States or its allies and may pose a threat to US national security interests." Despite signing the bill Mr Obama made plain his reservations about its implications in other potential cases.
Citing precedent established by former president George H.W. Bush, Obama wrote that the law could restrict his powers to accept or reject the credentials of foreign ambassadors.
"Acts of espionage and terrorism against the United States and our allies are unquestionably problems of the utmost gravity," Mr Obama said in signing the measure.
"I share the Congress's concern that individuals who have engaged in such activity may use the cover of diplomacy to gain access to our nation." But he added that he would treat the new law as an "advisory" only.
Presidents sometimes release signing statements when they believe that a new law infringes on their executive powers as defined by the US Constitution.
In 1979, dozens of American diplomats and staff were held for 444 days by radical Iranian students at the US embassy in Teheran.
The protracted standoff profoundly shocked the United States and led to the severing of all diplomatic ties between the US and Iran for the past three decades.
As the host government, the United States is generally obliged to issue visas to diplomats who serve at the United Nations.
Mr Aboutalebi, a veteran diplomat who currently heads Iranian President Hassan Rouhani's political affairs bureau, has insisted he was not part of the hostage-taking in November 1979, when a Muslim student group seized the US embassy after the overthrow of the pro-Western shah.
He has acknowledged he served a limited role as a translator for the students who took the Americans hostage.