President Barack Obama said Friday that he spoke by telephone with Iranian President Hassan Rouhani, in what was the first communication between the leaders of the two countries since the Iranian Revolution in 1979.

The call came after U.S. officials said earlier this week that the two would not meet at the U.N. General Assembly. The officials said that a meeting would be too "complicated" for the Iranians given the country's internal politics.

"The two of us discussed our ongoing efforts to reach an agreement over Iran's nuclear program," said Obama. "I reiterated to President Rouhani what I said in New York: while there were surely be important obstacles to moving forward and success is by no means guaranteed, I believe we can reach a comprehensive solution."

"Resolving this issue could serve as a major step forward in a new relationship between the United States and the Islamic Republic of Iran, one based on mutual interest and mutual respect," he said.

Rouhani took to Twitter to relay details of the call:

[See UPDATE below.]

A senior Obama administration official told reporters later Friday that the call was initiated by Rouhani's team, and that the Iranian president had expressed a desire to speak with Obama before he boarded a flight home to Tehran Friday afternoon.

The request came as a surprise, the White House said, especially after Iran had declined the U.S.' invitation to meet at the General Assembly. Nonetheless, the invitation to connect directly with Obama had remained "open."

The fifteen minute call took place around 2:30PM, said the official, who spoke on background in order to discuss ongoing negotiations.

Rouhani speaks fluent English, but the two leaders spoke through an interpreter, as is common practice for high-level diplomatic calls.

The White House released the below photo of Obama on the phone with Rouhani:

obama iran

The official said that leaders in Congress were notified that the call would take place ahead of time, as was the government of Israel, a longtime U.S. ally that has hostile relations with Iran.

Obama opened the call by congratulating Rouhani on his election victory earlier this year. Both leaders went on to express their determination to resolve the issue of Iran's nuclear program peacefully and expeditiously, said the official. Overall, "the call was quite cordial in tone."

But some contentious issues were raised, including the whereabouts of three American citizens: Amir Hekmati and Saeed Abedini, both of whom are currently in Iranian custody, and Robert Levinson, who went missing in Iran in 2007. Obama urged Rouhani and the Iranian government to help the Americans get home to their families.

Going forward, the official said, it's unlikely that Obama and Rouhani will maintain regular phone contact, because the substance of any nuclear negotiations must occur within the international framework known as the P5+1. "There's a lot of technical discussion that needs to take place."

Both Rouhani and Obama have delegated future nuclear talks to their foreign ministers: Iranian Foreign Minister Javad Zarif and U.S. Secretary of State John Kerry.

UPDATE: 8:30 p.m. -- The six tweets describing Rouhani's call with Obama appeared to have been deleted from his Twitter account Friday evening. A spokesman for Iran's mission to the United Nations didn't immediately respond to an email inquiry from the Huffington Post about the deletions.

Earlier in the day, U.S. officials praised Rouhani's use of Twitter, and said they hoped his use of the social media site would help prompt Iran to end strict Twitter censorship inside the country. "We've noticed Rouhani's Twitter feed, and it's a welcome development," said one official.

"We'll be making use of our Twitter account as well. We'd like to see Iranians have access to Facebook and Twitter, and we believe [social media] is a positive means for expression and communication." The official said the Obama administration would continue to monitor Rouhani's Twitter feed.

Also on HuffPost:

Loading Slideshow...
  • Raul Castro, President Of Cuba

    In this image from TV, US President Barack Obama shakes hands with Cuban President Raul Castro at the FNB Stadium in Soweto, South Africa, in the rain for a memorial service for former South African President Nelson Mandela, Tuesday Dec. 10, 2013. (AP Photo/SABC Pool)

  • Cristina Fernandez, President Of Argentina

    President Barack Obama meets with Argentina's President Cristina Fernandez at the G20 Summit in Cannes, France, Friday, Nov. 4, 2011. (AP Photo/Charles Dharapak)

  • Hamid Karzai, President Of Afghanistan

    Afghanistan President Hamid Karzai (L) and U.S. President Barack Obama shake hands after a joint news conference in the East Room of the White House on January 11, 2013 in Washington, D.C. (Photo by Chip Somodevilla/Getty Images)

  • Julia Gillard, Prime Minister Of Australia

    U.S. President Barack Obama (L) and Australian Prime Minister Julia Gillard shake hands during a bilateral meeting at Parliament House in Canberra on November 16, 2011. (JIM WATSON/AFP/Getty Images)

  • Dilma Rousseff, President Of Brazil

    U.S. President Barack Obama (L) shakes hands with Brazilian President Dilma Vana Rousseff (R) during a joint press conference at Palacio do Planalto in Brasilia on March 19, 2011. (JIM WATSON/AFP/Getty Images) <em><strong>CORRECTION:</strong> The title of this slide initially referred to Dilma Rousseff as the prime minister of Brazil. In fact, she is the president of Brazil.</em>

  • Hun Sen, Prime Minister Of Cambodia

    U.S. President Barack Obama (L) and Cambodian Prime Minister Hun Sen (R) reach out to shake hands on arrival at the Peace Palace for the Association of Southeast Asian Nations (ASEAN) and US summit in Phnom Penh on November 19, 2012 following the 21st ASEAN Leaders Summit. (ROMEO GACAD/AFP/Getty Images)

  • Stephen Harper, Prime Minister Of Canada

    President Barack Obama shakes hands with Canada’s Prime Minister Stephen Harper in bilateral meeting during the G20 Summit, Tuesday, June 19, 2012, in Los Cabos, Mexico. (AP Photo/Carolyn Kaster)

  • Sebastian Pinera, President Of Chile

    U.S. President Barack Obama greets Chilean President Sebastian Pinera before a dinner at the Washington Convention Center during the Nuclear Security Summit in Washington, DC, on April 12, 2010. (JEWEL SAMAD/AFP/Getty Images)

  • Xi Jinping, President Of China

    U.S. President Barack Obama shakes hands with then-Chinese Vice President Xi Jinping during meetings in the Oval Office of the White House in Washington, DC, February 14, 2012. (SAUL LOEB/AFP/Getty Images)

  • Juan Manuel Santos, President Of Colombia

    Colombia President Juan Manuel Santos (R) and U.S. President Barack Obama shake hands during a joint press conference in the framework of the VI Summit of the Americas at Casa de Huespedes in Cartagena, Colombia, on April 15, 2012. (SAUL LOEB/AFP/Getty Images)

  • Laura Chinchilla, President Of Costa Rica

    President Barack Obama and Costa Rica's President Laura Chinchilla shake hands at the end of their joint press conference in San Jose, Costa Rica, Friday, May 3, 2013. (AP Photo/Moises Castillo)

  • Francois Hollande, President Of France

    President Barack Obama shakes hands with French President Francois Hollande on arrival for the G8 Summit Friday, May 18, 2012 at Camp David, Md. (AP Photo/Charles Dharapak)

  • Angela Merkel, Chancellor Of Germany

    U.S. President Barack Obama (R) shakes hands with German Chancellor Angela Merkel looks after a joint press conference following their meeting in the East Room of the White House in Washington, D.C., on June 7, 2011. (JEWEL SAMAD/AFP/Getty Images)

  • Giorgio Napolitano, President Of Italy

    President Barack Obama shakes hands with Italian President Giorgio Napolitano during their meeting in the Oval Office of the White House in Washington, Friday, Feb. 15, 2013. (AP Photo/Jacquelyn Martin)

  • Shinzo Abe, Prime Minister Of Japan

    President Barack Obama shakes hands with Japan's Prime Minister Shinzo Abe in the Oval Office of the White House in Washington, Friday, Feb. 22, 2013. (AP Photo/Charles Dharapak)

  • Park Geu-Hye, President Of South Korea

    President Barack Obama and South Korea President Park Geun-Hye shake hands at the conclusion of their joint news conference in the East Room of the White House in Washington, Tuesday, May 7, 2013. (AP Photo/Pablo Martinez Monsivais)

  • Enrique Pena Nieto, President Of Mexico

    President Barack Obama, left, and Mexico President Enrique Pena Nieto, right, shake hands following a news conference at the Palacio Nacional in Mexico City, Thursday, May 2, 2013. (AP Photo/Pablo Martinez Monsivais)

  • Benigno Aquino, President Of The Philippines

    U.S. President Barack Obama (R) shakes hands with President Benigno Aquino of the Philippines in the Oval Office at the White House on June 8, 2012 in Washington, D.C. (Photo by Kevin Dietsch-Pool/Getty Images)

  • Donald Tusk, Prime Minister Of Poland

    Polish Prime Minister Donald Tusk (R) shake hands with U.S. President Barack Obama (L) during their meeting in Warsaw on May 28, 2011. (JANEK SKARZYNSKI/AFP/Getty Images)

  • Sheik Hamad bin Khalifa Al Thani, Amir Of Qatar

    President Barack Obama shakes hands with Sheik Hamad bin Khalifa Al Thani of Qatar during their meeting in the Oval Office of the White House in Washington, Tuesday, April 23, 2013. (AP Photo/Pablo Martinez Monsivais)

  • Traian Basescu, President Of Romania

    U.S. President Barack Obama (R) greets Romania's President Traian Basescu before a dinner at the US Ambassador's residence in Prague on April 8, 2010. (JEWEL SAMAD/AFP/Getty Images)

  • Vladimir Putin, President Of Russia

    President Barack Obama shakes hands with Russia’s President Vladimir Putin in a bilateral meeting during the G20 Summit, Monday, June 18, 2012, in Los Cabos, Mexico. (AP Photo/Carolyn Kaster)

  • Abdullah bin Abdulaziz Al Saud, King Of Saudi Arabia

    U.S. President Barack Obama shakes hands with King Abdullah bin Abdulaziz Al Saud of Saudi Arabia during meetings in the Oval Office at the White House in Washington, DC, June 29, 2010. (SAUL LOEB/AFP/Getty Images)

  • Lee Hsien Loong, Prime Minister Of Singapore

    President Barack Obama shakes hands with with Singapore Prime Minister Lee Hsien Loong during their meeting in the Oval Office of the White House in Washington, Tuesday, April, 2, 2013. (AP Photo/Pablo Martinez Monsivais)

  • Fredrik Reinfeldt, Prime Minister Of Sweden

    U.S. President Barack Obama shakes hands with Sweden's Prime Minister Fredrik Reinfeldt (L) during meetings in the Oval Office of the White House in Washington, DC, November 2, 2009. (SAUL LOEB/AFP/Getty Images)

  • Yingluck Shinawatra, Prime Minister Of Thailand

    U.S. President Barack Obama, left, and Thai Prime Minister Yingluck Shinawatra shake hands following the conclusion of their joint news conference at Thai Government House in Bangkok, Thailand, Sunday, Nov. 18, 2012. (AP Photo/Pablo Martinez Monsivais)

  • Abdullah II, King Of Jordan

    FILE - In this March 22, 2013, file photo, President Barack Obama, left, and Jordan's King Abdullah II, right, shake hands following their joint new conference at the King's Palace in Amman, Jordan. (AP Photo/Pablo Martinez Monsivais, File)

  • Recep Tayyip Erdogan, Prime Minister Of Turkey

    U.S. President Barack Obama (R) shakes hands with Turkish Prime Minister Recep Tayyip Erdogan after their bilateral meeting in Seoul on March 25, 2012 on the eve of the 2012 Seoul Nuclear Security Summit. (JEWEL SAMAD/AFP/Getty Images)

  • David Cameron, Prime Minister Of Great Britain

    President Barack Obama shakes hands with Britain's Prime Minister David Cameron on arrival for the G8 Summit Friday, May 18, 2012 at Camp David, Md. (AP Photo/Charles Dharapak)

  • Hugo Chavez, Former President Of Venezuela

    Venezuelan President Hugo Chavez (R) gives a book, 'The Open Veins of Latin America' of Uruguayan writer Eduardo Galeano to US President Barack Obama (L) during a multilateral meeting to begin during the Summit of the Americas at the Hyatt Regency in Port of Spain, Trinidad April 18, 2009. (JIM WATSON/AFP/Getty Images)