(CNN) -- U.S. President Barack Obama spoke by telephone Friday with Iranian President Hassan Rouhani -- the first direct conversation between leaders in Washington and Tehran since 1979 -- raising the possibility a deal can be reached over Iran's controversial nuclear program.
Describing the conversation as a starting point, Obama said he believes an agreement is possible regarding Iran's nuclear ambitions that could lead to better relations.
"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 told reporters during a White House briefing.
Western leaders have expressed cautious optimism about Iran's more moderate tone under Rouhani, whose recent comments have raised hopes that a deal could be struck over the Middle Eastern nation's nuclear program.
Obama said he reiterated to Rouhani statements he made earlier in the week during the United Nations General Assembly, where he signaled the United States was open to negotiations with Iran provided real action is taken.
"So the test will be meaningful, transparent, and verifiable actions, which can also bring relief from the comprehensive international sanctions that are currently in place," he said Friday.
The conversation between the two men came at the end of the General Assembly, where conjecture abounded over whether Obama and Rouhani would meet in person and what that might mean for U.S.-Iranian relations.
Rouhani told reporters Friday that there wasn't enough time to plan such a face-to-face meeting.
The last time a U.S. president spoke with an Iranian leader was in 1979, when Jimmy Carter talked by telephone with Shah Mohammed Reza Pahlavi before Pahlavi was overthrown.
National Security Advisor Susan Rice told CNN's Fareed Zakaria that the administration was contacted by the Iranian delegation.
"Today, somewhat surprisingly, we were contacted by them to say that President Rouhani would like to speak to President Obama on the telephone on his way out of town, and we were able to make that call come together and it was a constructive conversation," she said.
The call lasted about 15 minutes, with translation, Rice said.
Rice characterized the call as "cordial and constructive."
The news of the conversation played out on Twitter in posts by Rouhani, who recounted his conversation with Obama just minutes before the American president spoke with reporters at a White House briefing.
A senior Obama administration official said Rouhani's tweets reflected the tone of the telepone conversation between the two leaders. "We'll continue to watch his Twitter feed," the official, speaking on condition of anonymity, said.
According to Rouhani's posts, Obama told the Iranian president that he was "convinced relations between Iran and US will greatly affect the region."
"@BarackObama to @HassanRouhani If we can make progress on #nuclear file, other issues such as #Syria will certainly be positively affected," the president said in a follow-up message.
Rouhani responded, according to his tweet: "In regards to #nuclear issue, with political #will, there is a way to rapidly solve the matter."
He also told Obama, according to his Twitter post, he was hopeful about upcoming meetings on the issue between representatives of Iran and the permanent members of the U.N. Security Council -- the U.S., China, Russia, Britain and France -- as well as Germany.
"@HassanRouhani to @BarackObama: I express my gratitude for your #hospitality and your phone call. Have a good day Mr President," Rouhani said in post on Twitter.
Earlier, Rouhani told reporters he was heartened by Thursday's meeting between U.S. Secretary of State John Kerry and Iranian Foreign Minister Mohammad Javad Zarif as part of a meeting between Iran and the six countries trying to tackle international concerns about Iran's nuclear program.
It was the first face-to-face meeting between such high-level officials of the two countries in more than 30 years.
Obama and Rouhani both indicated that the talks between Kerry and Zarif will continue at the so-called P5+1 meeting, which brings together representatives of the five permanent member states of the United Nations and Germany with emissaries from Iran over Tehran's nuclear program.
"Throughout this process, we will stay in close touch with our friends and allies in the region, including Israel," Obama told reporters, acknowledging concerns such talks are likely to raise with Israeli leaders.
Obama acknowledged that after 35 years of mistrust, "a path to a meaningful agreement will be difficult and at this point both sides have significant concerns that will have to be overcome."
"But I believe we have a responsibility to pursue diplomacy, and that we have a unique opportunity to make progress with the new leadership in Tehran," he said.
Western leaders have said Iran seems to sound different under the leadership of Rouhani, who replaced Mahmoud Ahmadinejad as president this summer. On Friday, it was Rouhani's turn to return the compliment, saying European Union officials and Obama sound "different compared to the past."
Rouhani told reporters Friday his election helped pave the way for better relations between the Iran and the West, which has imposed heavy sanctions on the country. He also said Iran wants quick resolution to the nuclear issue. Western leaders believe the country's nuclear program is designed to produce weapons. Iranian leaders have said it is purely peaceful.
"I assure you that on the Iranian side, this will is there fully, 100%, that within a very short period of time, there will be a settlement on the nuclear issue," he told reporters.
CNN's Brianna Keilar contributed to this report.