It's the oddest of legislative couples: President Obama and one of his biggest critics, Ted Cruz.
Obama on Friday signed a Cruz-backed bill aimed at blocking Iran's appointed ambassador to the United Nations because of evidence linking him to the 1979 takeover of the American embassy in Tehran.
Technically, the law bars individuals from entering the U.S. as U.N. ambassadors if they are "found to have been engaged in espionage or terrorist activity directed against the United States or its allies."
In reality, the bill targets a specific Iranian individual: Hamid Aboutalebi, who has been refused a visa by the administration.
Cruz, a Republican senator from Texas who has attacked Obama on items ranging from health care to federal spending, may run for president himself in 2016. He thanked Obama with a tweet.
In a statement accompanying the bill signing, Obama said he shares congressional concern that people could use diplomatic cover to enter the United States to engage in espionage or terrorism.
Obama also made clear he considers the Iranian situation to be a unique one, and that he regards this particular law as "advisory" in nature.
Quoting predecessor George H.W. Bush, Obama wrote that "curtailing by statute my constitutional discretion to receive or reject ambassadors is neither a permissible nor a practical solution."
Therefore, the new law shall be regarded "as advisory in circumstances in which it would interfere with the exercise of this discretion," Obama wrote.