Obama and Ahmadinejad
Obama and AhmadinejadIsrael news photo montage

US President Barack Obama said on Monday that while Iran having a nuclear weapon would be a “real problem”, he did not think that military action by Israel or the United States against the Islamic Republic was the “ideal way” to solve the crisis, according to a Reuters report.

During a town-hall style meeting on CNBC, Obama said: “We continue to be open to diplomatic solutions to resolve this. We don't think that a war between Israel and Iran or military options would be the ideal way to solve this problem. But we are keeping all our options on the table.”

Obama plans to use his address to the United Nations General Assembly on Thursday to tell Iran that the “door is open” to better relations with the international community, as long as it can demonstrate the peaceful intent of its nuclear program. Obama will stress during his speech that if Iran fails to meet its international obligations, the cost of its uranium enrichment program will escalate.

Both the US and the UN Security Council have tightened their sanctions on Iran in recent months.

Iranian President Mahmoud Ahmadinejad has continuously verbally attacked both Israel and the US.  In an interview he gave to the Al-Jazeera network several weeks ago, Ahmadinejad said that Israel is “too weak” to attack Iran's nuclear facilities and dismissed the possibility of a US strike on Iran's nuclear facilities, saying that “America is not interested in sparking a military confrontation. There are no logical reasons for the United States to carry out such an act. Do you believe an army that has been defeated by a small army in Iraq can enter into a war with a large and well trained army like the Iranian army?”

Ahmadinejad has offered the US his country’s friendship, saying that “the friendship of Iran is much better than its hostility.”

White House deputy national security adviser Ben Rhodes told reporters on Monday that "the door is open to [Iran] having a better relationship with the United States and with the international community. However, in order to walk through that door, Iran is going to have to demonstrate its commitment to show its peaceful intent around its nuclear program, and meet its obligations to the international community.”

Ahmadinejad is currently in New York to take part in the General Assembly, and conducted a meeting with UN Secretary General Ban Ki-moon on Sunday. During the meeting, Ban urged the Iranian President to enter negotiations regarding its nuclear program.

President Shimon Peres, who is also currently in New York, criticized Ahmedinjad after his speech to the General Assembly on Sunday. Peres told reporters that Ahmadinejad “calls for our destruction, and supplies arms to every terrorist organization in the Middle East.”