Barack Obama and Hassan Rouhani held the first direct talks between American and Iranian leaders since the 1979 Islamic revolution, exchanging pleasantries in a 15-minute telephone call on Friday that raised the prospect of relief for Tehran from crippling economic sanctions.

Speaking at the White House shortly after the historic call, Obama said his discussion with Rouhani had shown the "basis for resolution" of the dispute over Iran nuclear programme.

The conversation, in which Obama communicated his "deep respect for the Iranian people", capped a week of diplomatic breakthroughs. Rouhani ended a five-day visit to New York for the UN general assembly with a striking offer to work rapidly to defuse tensions with America, and hailed the US as "a great nation" – a dramatic shift in tone for an Iranian leader.

Both leaders expressed confidence their countries could reach a peaceful settlement to their standoff over Iranian nuclear programme. Obama, in his White House statement, said: "While there will be significant obstacles and success is by no means guaranteed, I believe we can reach a comprehensive solution. I do believe that there is a basis for a resolution."

Obama cautioned against over-optimism, however. "We're mindful of all the challenges ahead," he told reporters. "The test will be meaningful, transparent and verifiable actions which can also bring relief from the comprehensive international sanctions that are currently in place."

Minutes earlier, President Rouhani's English-language Twitter account broke news of the phone call in a series of tweets that hinted at a remarkably swift rapprochement between the two countries since the moderate cleric was elected in June. The tweets were deleted several hours later and replaced with more sombre versions.

One tweet said Rouhani had concluded the phone call by telling Obama to "have a nice day!" and Obama had thanked him and said goodbye in Persian – "Khodahafez", which means "God go with you". That tweet was later deleted and replaced:

The tweets, which were published by Rouhani's aides, suggested the tone of the conversation was friendly, even punctuated by banter. Obama was quoted as saying: "I wish you a safe and pleasant journey and apologize if you're experiencing the [horrendous] traffic in NYC."

Earlier, at a press conference in New York, Rouhani made the most conciliatory remarks heard from Tehran in a decade and also offered to prepare a concrete plan for resolving the nuclear stalemate to a new round of negotiations in Geneva on 15 October.

He said Tehran might go even further, hinting at a possible confidence-building measure to be announced at the talks. But it was Rouhani's tone that was most remarkable, at the end of a week in which he sought to present Iran as a reborn country, following his June election.

"The environment that has been created is quite different from the past, and those who have brought the change was the people of Iran," he said. "The first step has been taken here which is a beginning for better relations with other countries and in particular, between the two great nations of Iran and US.

"So the understanding between our peoples will grow and our governments will first stop the escalation of tensions, and then defuse those tensions."

The conciliatory language marked a radical change from the presidency of his predecessor, Mahmoud Ahmadinejad, and a break from tradition dating to the 1979 revolution of referring to the US as the "Great Satan". It mirrored a change on the streets of Tehran, where the ritual chanting of "Death to America" has almost died out at public gatherings since the elections.

"Step by step, we will build confidence between our presidents and our countries," Rouhani said " With sufficient will on both sides – and I assure you that on Iran's side the will is 100% – the nuclear file will be resolved in a short period of time."

Rouhani rejected suggestions that his flexibility at the negotiating table was constrained by hardline forces back in Iran.

"My government has full authority in these negotiations with support from all three arms of government as well as the people of Iran. I have complete backing."

Nevertheless, in an indication of the precarious position in which Rouhani finds himself, the state news agency in Iran earlier this week disputed the translation of an interview he conducted with CNN. In the interview, Rouhani acknowledged that the Holocaust took place. CNN pointed out that the translator for the interview was provided by the Iranian government.

There were also suggestions that Obama and Rouhani might meet informally on the sidelines of the UN general assembly this week, but the prospect of a picture of the two leaders shaking hands appears to have been too much even for the new, moderate regime. A telephone call, however, was more palatable.

According to the White House, the idea to hold the call came at short notice from the Rouhani team. Having turned out the chance of a face-to-face meeting at the UN because it would be "too complicated", Rouhani said he wanted to talk to Obama before he left for Iran.

The call took place at 2.30pm ET, it lasted about 15 minutes and was conducted through an interpreter. A senior administration official confirmed that Rouhani's Twitter feed had accurately reflected the tone of the conversation, and noted: "We'll be continuing to watch that Twitter account."

"It was quite cordial in tone," the official said. "Both leaders expressed their determination to solve this [nuclear] issue expeditiously. Both leaders expressed that sense of urgency."

The official said that the Israeli government and congressional leaders, both sources of resistance to a rapprochement between Washington and Tehran, had been alerted before the call began. The official recalled that in his first inaugural address in January 2009, Obama declared, in a phrase directly aimed at Tehran: "We will extend a hand if you are willing to unclench your fist." The official added: "What we are have seen here is a unclenching – hopefully – of that fist."

In his White House press conference, Obama acknowledged the historic nature of the call. "The very fact that this was the first communication between an American and Iranian president since 1979 underscores the deep mistrust between our countries but it also indicates the prospect of moving beyond that difficult history," he said.

Describing the sequence of events that led to the talks, Obama added: "Iran's supreme leader has issued a fatwa against the development of nuclear weapons. Rouhani has indicated that Iran will never develop nuclear weapons. I made clear that we respect the right of the Iranian people to access peaceful nuclear energy."