"Israelis must recognize that continued settlement activity is counterproductive to the cause of peace, and that an independent Palestine must be viable -- that real borders will have to be drawn," Obama said.
On a personal note, the president told how he met with young Palestinians before his speech and they differed little from his own daughters, adding that he believed Israeli parents would want Palestinian youths to succeed if they had a chance to talk to them.
During his earlier visit to to Ramallah in the West Bank, Obama stressed the need for direct talks between Israelis and Palestinians for a two-state solution.
"The Palestinian people deserve an end to occupation and the daily indignities that come with it," he said at a news conference with Abbas, adding that Palestinians deserve "a future of hope" and a "state of their own."
Obama said he and Abbas discussed, among other things, the Israeli settlements and the issue of Palestinian prisoners. He called for shunning the old habits, arguments and formulas that have stymied the peace process and envisioned "two nations, two neighbors at peace, Israel and Palestine."
At the news conference and in his later speech, Obama said the foundation for a peace agreement exists if both sides can overcome internal and external obstacles and pressure, and can join together making the leap.
The core issues right now, Obama said, are achieving sovereignty for Palestinians and security for Israel.
"That's not to say settlements are not important," he told reporters. "It is to say that if we solve those two problems, the settlement problem will be solved. So I don't want to put the cart before the horse. I want to make sure that we are getting to the core issues and the substance."
During a news conference on Wednesday with Netanyahu, neither leader mentioned the settlements, showing the sensitivity of the issue for the conservative prime minister who just formed a new coalition government after a narrow election victory.
In Ramallah on Thursday, Obama praised the Palestinian Authority led by Abbas but said Hamas, which governs Gaza, "has the responsibility to prevent" violations of a cease-fire with Israel such as the two rockets fired in the morning.
Abbas: Peace 'is necessary'
Abbas, however, said the Israeli settlements are "more than a hurdle to peace," calling them illegal and saying it was Israel's duty to stop building them.
At the same time, Abbas said Palestinians believe peace "is necessary and inevitable," and it should not be made through violence, occupation, walls, denial of refugee rights or settlements -- reciting a list of Palestinian grievances against Israel.
He envisioned a Palestinian state based on 1967 borders with Jerusalem as capital -- a scenario unacceptable to Israel.
On Wednesday, Obama and Netanyahu offered a "good cop-bad cop" approach to Iran's nuclear ambitions.
Both countries have accused Iran of secretly working toward building a nuclear weapon, and Netanyahu made it clear Wednesday after his talks with Obama that he believes the president is equally committed to preventing a nuclear-armed Iran.
In comments to reporters Wednesday and in Thursday's speech, Obama called for more diplomacy on Iran while endorsing Israel's right to defend itself as it sees fit. He also insisted that "all options" remain open -- code for a military strike to disable the Iranian program.
That prompted a warning Thursday from Iran's supreme leader, Ayatollah Khamenei, that Tehran would destroy Tel Aviv if Israel were to attack its nuclear facilities.
Obama also warned the Syrian government that using chemical weapons against opposition forces or allowing such weapons to be obtained by terrorists would be a "game-changer" in terms of U.S. involvement in the conflict. His administration has been criticized for not providing military aid to the Syrian opposition.
On Wednesday, Obama sought to assure Netanyahu and Israelis of his commitment to their security and to strengthen what have been strained personal and working relationships between the two men.
In what Netanyahu called a key development, the leaders announced new talks on extending U.S. military assistance to Israel for another 10 years past the current agreement, which expires in 2017.