The chat between President Obama and Hassan Rouhani lasted about 15 minutes before Mr. Rouhani left New York.
WASHINGTON — President Obama and Iranian President Hassan Rouhani spoke by phone Friday, the highest-level contact between the nations in decades and a sign 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 after the 1979 revolution led to the U.S. Embassy hostage crisis in which 52 Americans were held hostage for 444 days.
Mr. Obama has said for years he was open to direct contact with Iran while stressing that all options — including military strikes — were on the table to keep Iran from building a nuclear bomb.
The President had hoped to meet with Mr. Rouhani at the U.N. General Assembly in New York this week, but the Iranian side decided an encounter was too complicated. White House officials saw it as an effort to avoid antagonizing hard-liners in Tehran.
But Friday the Iranians said Mr. Rouhani expressed interest in a phone discussion before he left the United States, a senior administration official said.
The White House arranged the call, which lasted about 15 minutes.
A source close to Mr. 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.
Mr. Obama told reporters he and Mr. Rouhani had directed their teams to work quickly toward a deal on Iran’s nuclear program. He said this was a unique chance 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,” Mr. Obama said.
“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, Mr. Obama said.
Mr. Rouhani, in his Twitter account, said that in the conversation, he told Mr. Obama, “Have a nice day!” and Mr. Obama responded with, “Thank you. Khodahafez [good-bye].”
He added the two men “expressed their mutual political will to rapidly solve the nuclear issue.”
The phone call, the first between the heads of government of the two nations since 1979, occurred while Mr. Rouhani was heading to the airport after his first visit to the U.N. General Assembly, according to Mr. Rouhani’s official Web site.
Mr. Rouhani said earlier 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 in Geneva.
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.
An Obama Administration official said the United States told the Israeli government about the Obama-Rouhani call. Israel is skeptical about the shift in Iran’s rhetoric and has warned its allies to be wary of Mr. Rouhani.
As president, Mr. 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, but Mr. Rouhani says he has been given full authority to negotiate on the nuclear issue.