Just as the Obama administration was reaching out to Iran, the Islamic Republic sentenced an American journalist to eight years in prison and leveled a heated new attack on Israel as racist.
Yet Iran also said it was ready for better relations with the United States after three decades of diplomatic stalemate — another in the mixed messages from Tehran that reflect the tug-of-war within Iran's ruling class over the idea of moving closer to Washington.
Iranian officials flip-flop on an almost daily basis, with the tone toward the United States running hot and cold.
The complex Iranian political landscape is a challenge for President Barack Obama as his administration decides how to approach Iran.
High on the list is hard-line President Mahmoud Ahmadinejad, a deeply polarizing figure who has called repeatedly for Israel's destruction, denied the Holocaust and insisted Iran won't give up uranium enrichment despite U.N. Security Council demands to stop.
'Serious about engaging'
A day after the Iranian leader attacked Israel during a speech at a U.N. racism conference, Obama on Tuesday called it "the kind of rhetoric that we've come to expect from President Ahmadinejad" but said he was serious about engaging with Iran.
During his campaign, Obama added, "I was very clear that I found many of the statements that President Ahmadinejad made, particularly those directed — directed at Israel to be appalling and objectionable. As I've also said before, Iran is a very complicated country with a lot of different power centers."
Ahmadinejad, who is up for re-election in June, called Israel the "most cruel and repressive racist regime" while speaking at the U.N. conference. The comments prompted diplomats from every European Union country to walk out and drew condemnation from Israel.
The Iranian leader did drop language from his text that described the Holocaust as "ambiguous and dubious," U.N. officials said Tuesday, but the Iranian mission in Geneva did not comment on why the change was made.
Back home, Ahmadinejad returned to a hero's welcome at Tehran's airport Tuesday, greeted by hundreds of well-wishers who offered bouquets of flowers.
The new U.S. administration may be waiting to see who wins Iran's presidential election before showing its hand toward Iran. But for now, and for years to come if he is re-elected, American diplomats will have to deal with Ahmadinejad.
Iran hard for outsiders to read
Iran is often hard for outsiders to read. Internal factions are battling for the upper hand domestically and against the international community. The jockeying has grown even more complex ahead of the June 12 election.
The case of journalist Roxana Saberi has laid bare those divisions. Her conviction on charges of spying for Washington was seen as an effort by Iran's ruling clerics not to appear to be giving in to pressure from the U.S., which called the charges baseless and demanded her release.
Iran's Revolutionary Court convicted Saberi last Wednesday, a few days after a trial behind closed doors that her father said lasted about 15 minutes.
But even as Saberi faced the court, Ahmadinejad was giving the strongest signal yet that Iran's leaders are ready for a new start with the U.S., saying Iran "may forget the past and start a new era." And Iran appears to be steadily backing off on the case.
Reporter's sentence reconsidered
Ahmadinejad made a rare request to Tehran's chief prosecutor to allow Saberi and a jailed Canadian-Iranian blogger the chance to fully defend themselves. Then the judiciary chief ordered a full investigation of Saberi's case during appeal. On Tuesday, the judiciary spokesman said her sentence might be reconsidered — a hint it could be commuted.
Ahmadinejad could have his eye on the June 12 election in softening his stance on the case. Though he has the backing of powerful hard-liners, his popularity is waning among voters who say he spends too much time lashing out at the U.S. and Israel and not enough trying to fix the economy, which suffers from high inflation and unemployment.
His top opponent is former prime minister Mir Hossein Mousavi, a reformist who supports better ties with the United States and appeals to many younger Iranians, who make up about 40 percent of eligible voters.
"Ahmadinejad is in an awkward position because his hard-line political backers are averse to warming relations with the U.S., yet he has to appeal to a young electorate which overwhelmingly favors restoring relations with Washington," said Karim Sadjadpour, an Iran expert at the Carnegie Endowment for International Peace in Washington.
Invited to talks
Analysts say Ahmadinejad is also trying to gain favor with Washington, which broke off ties with Iran after the 1979 Islamic revolution. The U.S. and the other permanent members of the U.N. Security Council and Germany have invited Iran to a new round of nuclear talks — a move that would bring the two adversaries to the same table.
"His intervention is a political decision aimed at paving the way to resume ties with the U.S. and get concessions from Washington," said Iranian legal affairs expert Saleh Nikbakht.
Iran's nuclear program has been the most contentious issue between the U.S. and Tehran. Washington says it is secretly aimed at building atomic weapons in violation of Iran's treaty commitments. Oil-rich Iran denies that, saying the program is for using nuclear reactors to generate electricity.
U.S. officials say the Obama administration may be willing for Iran to continue enrichment while negotiations are under way — although they insist a halt remains the ultimate goal.
Some analysts say Iran may be holding Saberi as a bargaining chip in a complex political game, expecting concessions from Washington in return for her release. U.S. officials have indicated Iran would gain goodwill if the Iranians "responded in a positive way" to demands to free the journalist.