Jerusalem (CNN) -- President Barack Obama tried Thursday to invigorate the stalled Middle East peace process, urging young Israelis to pressure their leaders to seek peace with Palestinians while acknowledging the Jewish state's historical right to exist and defend itself from continuing threats.
In a speech in Jerusalem that Obama had said would lay out his vision for the region, the president urged Israelis to look at the world through the eyes of Palestinians but also said enemies of Israel must change their rhetoric and tactics to reflect modern reality.
"You are not alone," Obama said in both English and Hebrew, prompting a standing ovation when he declared that "those who adhere to the ideology of rejecting Israel's right to exist might as well reject the Earth beneath them and the sky above, because Israel is not going anywhere."
Hours before the speech on the second day of a Middle East swing, two rockets fired from Palestinian-controlled Gaza landed in southern Israel.
They caused no injuries or major damage, but served as a symbolic welcome to Obama's visit to the West Bank on Thursday to meet with Palestinian President Mahmoud Abbas. A hardline group claimed responsibility.
Israel honors Obama
In another symbolic moment, Obama received Israel's highest civilian honor -- the Presidential Medal of Distinction -- Thursday night from Israeli President Shimon Peres at a state dinner that emphasized the close ties between their countries.
Noting the similarity between the histories of Israelis and African-Americans as former slaves who endured hardship before gaining freedom in a new land, Obama said, "Our very existence, our presence here tonight, is a testament that all things are possible."
The earlier talks with Abbas served as a counterbalance to Obama's meetings the previous day with Israeli Prime Minister Benjamin Netanyahu, setting up the Jerusalem speech that addressed crucial issues of the stalled peace process as well as regional concerns such as the civil war in neighboring Syria and Iran's efforts to develop a nuclear weapon.
When Obama mentioned the name of Abbas in his speech Thursday, some boos erupted in the Jerusalem Convention Center among the audience of mostly young Israelis. He also was interrupted at one point by a protester's shouts, causing the president to joke that the heckling "made me feel at home" in reference to the caustic political climate in Washington.
Obama acknowledged the difficulty in resolving the Israeli-Palestinian impasse, but insisted that "peace is possible" and called on young Israelis to make it happen.
"Political leaders will not take risks if the people do not demand that they do," Obama said to applause, adding a familiar theme from his U.S. campaign speeches in declaring "you must create the change that you want to see."
Such a direct appeal to young Israelis was a "bold and courageous" move by Obama, according to Martin Indyk, a former U.S. ambassador to Israel who now is vice president and director of foreign policy at the Brookings Institution in Washington.
Noting that the president lowered expectations before his trip of what he could accomplish, Indyk told CNN that Obama now raised expectations "sky high" that he was going to personally work to make peace possible.
Kerry staying for more talks
Recently appointed Secretary of State John Kerry, who accompanied Obama on the trip that ends Friday in Jordan, will stay on to hold more talks with Israeli leaders, a senior administration official told reporters in a background briefing.
"We've done a lot of talking, a lot of listening over the course of the last two days, we'll do some more tomorrow, and then I think it'll be appropriate for Secretary Kerry to discuss next steps when he returns here," the official said.
Obama said in his speech that he believes "the Israeli people do want peace, and you have every right to be skeptical that it can be achieved," arguing that an end to the seemingly endless conflict is necessary and "the only path to true security" for Israel.
"Given the demographics west of the Jordan River, the only way for Israel to endure and thrive as a Jewish and democratic state is through the realization of an independent and viable Palestine," Obama said. "Given the frustration in the international community, Israel must reverse an undertow of isolation. And given the march of technology, the only way to truly protect the Israeli people is through the absence of war -- because no wall is high enough, and no Iron Dome is strong enough, to stop every enemy from inflicting harm. "
At the same time, he urged Israelis to empathize with the plight of Palestinians, using direct and harsh imagery to make his point.
"Put yourself in their shoes -- look at the world through their eyes," he said. "It is not fair that a Palestinian child cannot grow up in a state of her own, and lives with the presence of a foreign army that controls the movements of her parents every single day. It is not just when settler violence against Palestinians goes unpunished. It is not right to prevent Palestinians from farming their lands; to restrict a student's ability to move around the West Bank; or to displace Palestinian families from their home."
He added that "neither occupation nor expulsion is the answer," saying, "just as Israelis built a state in their homeland, Palestinians have a right to be a free people in their own land."
Arab states must seek normalized relations with Israel, and Palestinians must "recognize that Israel will be a Jewish state, and that Israelis have the right to insist upon their security," Obama also said.
Obama: Israeli settlements 'counterproductive'
He prompted applause from the young Israeli crowd when he criticized their government's controversial policy of building new settlements in disputed territories.
"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.
CNN's Jessica Yellin and John King reported from Jerusalem and the West Bank, and CNN's Azadeh Ansari, Karen Smith, Michael Schwartz, Jason Hanna, Joe Sterling, Holly Yan and Paul Steinhauser contributed to this report, which was written by Tom Cohen in Washington.