right now president obama is in israel, his first trip there as president, and this is the message he is sending. The united states will stand with israel to prevent iran from getting a nuclear weapon. Abc's jonathan karl in jerusalem. Reporter: The president arrived in israel in a good mood -- an open mike capturing his banter with israeli prime minister benjamin netanyahu. It's good to be away from congress. Reporter: He was even joking about red lines. you are following the red line. Red line? Reporter: But the issue couldn't be more serious. The real red line is the one netanyahu talked about at the u.N. Last fall. I red line should be drawn right here. Reporter: The point where iran must be attacked or it will be able to build a nuclear bomb. A red line israelis believe could be crossed within months. The issue has front and center in all the president's meetings -- diplomacy and sanctions have so far not stopped iran's nuclear program. In order to stop iran's nuclear programs peacefully, diplomacy and sanctions must be augmented by clear and credible threat of military action. Reporter: The president said he believes ther diplomacy, but -- the united states will continue to consult closely with israel on next steps, and I will repeat, all options are on the table. We will do what is necessary to prevent iran from getting the world's worst weapons. Reporter: Iranian missiles, like this one they tested in january, can reach israel in less than ten minutes. Catastrophic if armed with nuclear warheads. Israel has been preparing for a possible pre-emptive strike. Their warplanes could reach iran's nuclear facilities in less than three hours. Israel's president told us he believes president obama is fully committed to keeping iran from getting the bomb. Do you have any doubt in your mind that president obama would give the order to launch a military strike against iran? As he has said, if all other options will not fly. Reporter: And you believe that? Yes. Reporter: The tough talk the president has brought is designed to put muscle behind the diplomacy. To force iran to back down before military intervention is necessary.

This transcript has been automatically generated and may not be 100% accurate.

Obama, Peres Deliver Remarks in Jerusalem: ABC News Digital Report

Presidential counterparts discuss their friendship and the relationship between the U.S. and Israel.

Shimon Peres: US Would Have To Take Lead in Military Strike Against Iran

President Obama in Israel to meet with Peres, Netanyahu to discuss Mideast issues.