By Jeff Mason and Louis Charbonneau
WASHINGTON/NEW YORK (Reuters) - President Barack Obama and new Iranian President Hassan Rouhani spoke by telephone on Friday, the highest-level contact between the two countries in three decades and a sign that they are serious about reaching a pact on Tehran's nuclear program.
The call is the culmination of a dramatic shift in tone between Iran and the United States, which cut diplomatic relations with Iran a year after the 1979 revolution that toppled U.S. ally Shah Mohammad Reza Pahlavi and led to the U.S. Embassy hostage crisis in Tehran.
Obama has said for years he was open to direct contact with Iran while also stressing that all options - including military strikes - were on the table to prevent Iran building a nuclear bomb.
The U.S. president had hoped to meet with the relatively moderate Rouhani at the U.N. General Assembly in New York this week, but the Iranian side decided an encounter was too complicated, in what was seen by White House officials as an effort to avoid antagonizing hardliners in Tehran.
On Friday, however, the Iranians said Rouhani expressed interest in a phone discussion before he left the United States, according to a senior administration official. The White House quickly arranged the call, which took place at 2:30 p.m. (1830 GMT) and lasted about 15 minutes.
A source close to Rouhani said the United States had reached out after positive talks between Secretary of State John Kerry and Iranian Foreign Minister Mohammad Javad Zarif a day earlier.
Speaking to reporters, Obama said he and Rouhani had directed their teams to work quickly toward an agreement on Iran's nuclear program. He said this was a unique opportunity to make progress with Tehran over an issue that has isolated it from the West.
"While there will surely be important obstacles to moving forward and success is by no means guaranteed, I believe we can reach a comprehensive solution," Obama said at the White House.
"The test will be meaningful, transparent, and verifiable actions, which can also bring relief from the comprehensive international sanctions that are currently in place" against Iran, Obama said.
Rouhani, in his Twitter account, said that in the conversation he told Obama "Have a Nice Day!" and Obama responded with "Thank you. Khodahafez (goodbye)."
He added that the two men "expressed their mutual political will to rapidly solve the nuclear issue."
The price of oil fell on Friday as tensions eased between the United States and Iran after the Obama-Rouhani talk.
"The phone call was an important milestone - a calculated risk by two cautious leaders mindful of domestic constraints," said Yasmin Alem, senior fellow at Atlantic Council's South Asia Center. "More than anything else it shows the high level of political capital invested in a peaceful resolution of the nuclear crisis."
The telephone call, the first between the heads of government of the two nations since 1979, came while Rouhani was heading to the airport after his first visit to the U.N. General Assembly, according to a statement on Rouhani's official website.
"The biggest taboo in Iranian politics has been broken. This is the beginning of a new era," said Ali Vaez, a senior Iran analyst at the International Crisis Group.
Such a call could not have been imagined under Rouhani's predecessor, former President Mahmoud Ahmadinejad, who antagonized Israel and the United States and denied the Holocaust.
A hardline website believed by Iran experts to be affiliated with Ahmadinejad, Rajanews, referred to the call as a "strange and useless action."
As president, Rouhani is the head of the government but has limited powers. Supreme Leader Ayatollah Ali Khamenei is the ultimate authority in Iran with final say on domestic and foreign policy, though Rouhani says he has been given full authority to negotiate on the nuclear issue.
Obama, who expressed willingness as a presidential candidate in 2007 to reach out to U.S. adversaries, nodded to that power dynamic in his remarks, saying both men had given signals that Iran would not pursue nuclear arms.
"Iran's Supreme Leader has issued a fatwa against the development of nuclear weapons. President Rouhani has indicated that Iran will never develop nuclear weapons," Obama said.
"I have made clear that we respect the right of the Iranian people to access peaceful nuclear energy in the context of Iran meeting its obligations."
Western powers say they believe Iran has been pursuing nuclear weapons for some time. Iran says its aims are peaceful and focused on energy production.
The Obama administration official said the United States had told the Israeli government about the Obama-Rouhani call. Israel is deeply skeptical about the shift in Iran's rhetoric and has warned its allies to be wary of Rouhani.
Rouhani was on a charm offensive during his week in New York, repeatedly stressing Iran's desire for normal relations with Western powers and denying it wanted a nuclear arsenal, while urging an end to sanctions that are crippling its economy.
In his speech to the 193-nation U.N. General Assembly on Tuesday, Obama cautiously embraced Rouhani's gestures as the basis for a possible nuclear deal and challenged him to demonstrate his sincerity.
However, the failure to orchestrate a handshake between the two leaders that day, apparently because of Rouhani's concerns about a backlash from hardliners at home, seemed to underscore how hard it may be to make diplomatic progress.
Iran and the United States back opposite sides in the Syrian civil war and have been at loggerheads for years over Israel, Tehran's support for Hezbollah militants in Lebanon and other issues. Washington broke off diplomatic relations with Iran in 1980 because of the U.S. Embassy hostage crisis. Fifty-two Americans were held hostage for 444 days.
Rouhani, who took office last month, told a news conference earlier on Friday he hoped talks with the United States and five other major powers "will yield, in a short period of time, tangible results," on a nuclear deal.
He said Iran would bring a plan to resolve the decade-long dispute over Tehran's nuclear program to an October meeting with the six powers in Geneva.
He offered no details about that plan, but emphasized that Tehran's nuclear ambitions are entirely peaceful.
(Additional reporting by Yeganeh Torbati, John Irish, Steve Holland, Mark Felsenthal and Marcus George; Editing by Alistair Bell and Xavier Briand)