Israeli Prime Minister Binyamin Netanyahu suggested Friday that President Obama holds an unrealistic view of how to achieve peace in the Middle East, saying that Israel would never pull back to the boundaries that the American president said a day earlier must be the basis for negotiations.

The unusual Oval Office exchange, following a nearly two-hour meeting, laid bare the fundamental differences between Obama and the hawkish leader of the chief U.S. ally in the Middle East. Republicans on Capitol Hill, meanwhile, injected partisan politics into the debate by vowing to formally condemn Obama’s position toward Israel in a resolution next week.

Obama and Netanyahu are allies only by tradition, and their relationship lacks personal warmth and is tested often by their differing political views. As they acknowledged their divisions in an appearance before reporters at the White House, it was clear that the split would not be easily resolved at a time when the Middle East and North Africa are undergoing historic political change.

“Israel wants peace. I want peace. What we all want is a peace that will be genuine, that will hold, that will endure,” said Netanyahu, addressing Obama next to him but also an evening television audience in Israel. “The only peace that will endure is one that is based on reality, on unshakable facts. I think for there to be peace, the Palestinians will have to accept some basic realities.”

Netanyahu, in a lecturing tone, then ruled out an Israeli withdrawal to the nation’s boundaries on the eve of the June 1967 Arab-Israeli war, which ended with the West Bank, Gaza Strip and other territories under Israel’s control.

Only a day earlier, Obama called for those 1967 lines to be the basis for Israeli-Palestinian peace negotiations over final borders, adding that negotiated land swaps would also be needed.

His predecessor, George W. Bush, had called Israel’s withdrawal to those lines “unrealistic,” given the large Israeli settlements that have been built in the West Bank over more than four decades of occupation.

Israel “cannot go back to the 1967 lines, because these lines are indefensible,” Netanyahu said Friday. “They don’t take into account certain changes that have taken place on the ground, demographic changes that have taken place over the last 44 years.”

Administration officials, who spoke on the condition of anonymity to describe the private meeting, said that Obama, like Bush before him, knows Israel will almost certainly not return to the 1967 lines in a final peace agreement. But the officials said Obama chose to stress a different starting point for talks, even though the negotiated outcome might be the same, to introduce a new element into what has been a stalled process.

“The positions are consistent,” one official said, referring to Obama’s and Bush’s policies toward negotiations. “We certainly know what the president’s position doesn’t mean — a return to the 1967 lines.”

Obama’s reference to the 1967 lines as a basis for talks, which took Israeli officials by surprise, prompted debate within the administration over how much pressure — or how little — he should apply to Israel at this time of political uncertainty across the Middle East, including in the Arab countries that are Israel’s neighbors.

In choosing to outline his position on future borders but not on the more emotionally charged issues of dividing Jerusalem or resettling Palestinian refugees, Obama opted for a middle ground between those who advocated for a specific blueprint for peace and those who favored giving Israel more time.

Among those in the former camp were Secretary of State Hillary Rodham Clinton, who phoned Netanyahu before Obama’s speech to tell him what the president would say — and received an angry response. Others, such as Middle East adviser Dennis Ross and national security adviser Thomas E. Donilon, argued that Obama should generally encourage both parties to return to the negotiating table.

“Obviously there are some differences between us in the precise formulations and language, and that’s going to happen between friends,” Obama said in his appearance with Netanyahu. “But what we are in complete accord about is that a true peace can only occur if the ultimate resolution allows Israel to defend itself against threats, and that Israel’s security will remain paramount in U.S. evaluations of any prospective peace deal.”

Obama spoke more briefly than Netanyahu, and he listened with his hand on his chin as the prime minister toured Israeli history, modern and ancient. But Obama did make several points that Netanyahu was hoping to hear.

Obama declared that Israel’s security as “a Jewish state” was the “ultimate goal” of any peace negotiation. He also said that “it is very difficult for Israel to negotiate in a serious way with a party that rejects its right to exist” and that Hamas, a U.S.-designated terrorist group, “is not a partner for a significant, realistic peace process.”

Hamas and Fatah, the Palestinians’ secular nationalist party, recently signed a pact to end years of sometimes violent confrontation and govern together. Netanyahu called Hamas “the Palestinian version of al-Qaeda” and said the leader of Fatah, Mahmoud Abbas, would have to choose whether “to keep his pact with Hamas or make peace with Israel.”

The White House meeting began a busy few days for Netanyahu in Washington, where he will address a joint session of Congress on Tuesday. Republicans, in particular, appeared to take his side Friday in criticizing Obama on Israel.

In a statement, Sen. Orrin G. Hatch (R-Utah) said he would introduce a congressional resolution next week “disapproving the president’s new policy towards Israel.” Hatch said the resolution would “affirm Israel’s right to maintain its territorial integrity.”

While in town, Netanyahu will attend the American Israel Public Affairs Committee’s annual convention. For the first time, Obama will also speak to AIPAC, the conservative pro-Israel lobby, in an address scheduled for Sunday.

American Jews are an important constituency within the Democratic Party and play a major role in fundraising. A year and a half before the next election, some American Jewish activists and voters are wary of Obama after his early pressure on Israel to stop settlement construction in the West Bank.

The most recent Gallup polling shows Obama with 65 percent approval among U.S. Jews. Democratic officials believe Obama will have no trouble winning the Jewish vote in 2012, but even a small dip in his popularity in Florida — a notoriously competitive state — could create problems for him.

Until just a few days ago, Obama was expected to make a trip to Israel this summer, perhaps at the end of June. Some White House officials had said they believed Obama would make a Middle East trip around then. But the lack of progress in the talks has made the prospect of such a visit seem less likely. “Obama is under a lot of pressure to go to Israel,” said one Democratic adviser who consults with the White House on Middle East issues.

Staff writer Anne E. Kornblut contributed to this report.