Obama, in the border town of Sderot, a frequent target of Hamas rocket fire, said he would use his role as U.S. president to facilitate an agreement between Israel and the Palestinians, not dictate conditions.
Obama, the junior U.S. senator from Illinois and the presumptive Democratic Party presidential nominee, has been traveling to international trouble spots this week to burnish his foreign affairs credentials.
Obama stressed he is committed to Israel's security, which he says is intertwined with U.S. security.
"A U.S. administration has to put its weight behind a process, recognizing that it's not going to happen immediately," Obama said. "And that's why I can't -- I will not wait, until a few years into my term or my second term, if I'm elected, in order to get the process moving. I think we have a window right now that needs to be taken advantage of."
Earlier Obama met with Israeli leaders in Jerusalem and Palestinian leaders in the West Bank.