"It got so close that they had chosen the room and ordered some water," said a diplomat with knowledge of talks between the two sides on holding a breakthrough encounter.
Leaders from Iran and the United States have not met since the 1979 Islamic Revolution brought often open hostility to their contacts, particularly over Iran's contested nuclear program.
Obama and Rowhani, who since winning an election in June has said he wants to improve relations, spoke several hours apart at the UN General Assembly on Tuesday. They were never in the same room together.
The United States appears to have taken the lead in pressing for a discussion of just a few minutes.
The two sides discussed a possible meeting, but in the end it was "too complicated," for Iran, said a senior US official.
Rowhani told CNN television in an interview how "preparation" for a meeting was carried out.
"The United States declared its interest in having such a meeting and in principle could have, under certain circumstances, allowed it to happen," he added.
"I believe we didn't have sufficient time to really coordinate the meeting."
Rowhani said that "ice-breaking" was still going ahead. The environment is changing and that has come about as a result of the will of the people of Iran to create a new era of relations," he said.
"We indicated that the two leaders could have had a discussion on the margins if the opportunity presented itself," said a senior US administration official, speaking on condition of anonymity.
"The Iranians got back to us; it was clear that it was too complicated for them to do that at this time given their own dynamic back home," the official added.
The approach for a meeting appears to have been a part of what Obama told the UN assembly would be efforts to "test" Iran on its willingness to improve relations.
And US officials said Obama remained open to a meeting with Iran's top leaders who have often excoriated their US counterparts.
"I think our assessment is while President Rowhani has been elected with a mandate to pursue a more moderate foreign policy towards the West and to pursue negotiations - in part to achieve sanctions relief - the issue of the relationship between the United States and Iran is incredibly controversial within Iran," said the senior US official.
"I think that from the Iranian side, for them it was just too difficult for them to move forward with that type of encounter at the presidential level, at this juncture."
US Secretary of State John Kerry will meet with Iran's Foreign Minister Mohammad Javad Zarif on Thursday.
COMMENTS (4)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
@Aqeel:
Obama and the US reached out. Rowhani backed out, probably due to domestic pressures. Please get your facts right.
That is why Iran is stable internaly and not taken for granted even by its enemies. Something for us to learn ... our learders are anxious to bend backwards for everyone and for every little thing whether it is foreign relations or as trivial as playing cricket match. Learn from Iran to keep the safe distance without compromising the principles...
Why is it such a big deal for two human beings to shake hands? Obama, in his speech, indicated US being the only leadership option for the world. Being the president, it makes him the president of the world. So wasn't THE president too arrogant to even consider shaking hands with one of his ordinary citizens?
Says much when you make speeches about becoming friends and then don't have the guts to shake someones hand. Duplicitous behavior has become the hallmark of some countries - you simply have to judge them by their actions not their words.