Washington (CNN) -- Israeli Prime Minister Benjamin Netanyahu on Friday firmly rejected President Barack Obama's call for an approximate return to the borders that existed before the 1967 Middle East war, telling the U.S. leader that such a move is impossible in light of current security concerns and demographic realities.
The two leaders pledged to work together, however, in the pursuit of a comprehensive Israeli-Palestinian peace agreement.
"Israel wants peace. I want peace," Netanyahu said while meeting with Obama at the White House. But "a peace based on illusions will crash eventually on the rocks of Middle Eastern reality," he said.
"Obviously there are some differences between us in the precise formulations and language, and that's going to happen between friends," Obama said.
"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."
Both men stressed that the presence of the militant group Hamas in a Palestinian government would be extremely problematic for future peace talks. The United States and Israel consider Hamas a terrorist group.
Palestinian leader Mahmoud Abbas "has to decide if he negotiates or keeps his pact with Hamas, or makes peace with Israel," Netanyahu said. "I hope he makes the choice -- the right choice -- in choosing peace with Israel."
But Abbas' spokesman said it was Netanyahu who was derailing the peace process.
"These statements are an official declaration that he is not ready for true peace based on justice and international resolutions," presidential spokesman Nabil Abu Rudeineh told the WAFA news agency.
Abu Rudeineh said the Palestinian government independent and has "nothing to do with Fatah or Hamas. What Netanyahu is saying are excuses to avoid sitting at the negotiating table," he said.
Obama's call Thursday for an approximate return to the 1967 borders, which made official a long-held but rarely stated U.S. position, has increased tension between the two longstanding allies at a moment of turbulent change in the Arab world.
Israel seized the West Bank, Gaza, Golan Heights and Sinai Peninsula during the 1967 war. The Sinai has since been returned to Egypt. Israel annexed the Golan Heights in 1981, a move not recognized by the international community and condemned by Syria, which still claims the land.
Hamas now controls Gaza, while the more moderate Palestinian group Fatah administers the West Bank, site of a growing number of Israeli settlements. Ultimately, the Palestinians are aiming to unite Gaza and the West Bank under the authority of a new state.
The Israeli government has repeatedly said, among other things, that peace talks with the Palestinians cannot seriously proceed without firmer security guarantees and a clear recognition of the Jewish state's right to exist.
Obama said Thursday that the borders of Israel and a Palestinian state "should be based on the 1967 lines with mutually agreed swaps, so that secure and recognized borders are established for both states."
His position largely agreed with the Palestinian negotiating stance on border issues in the staggering peace process, now stalled by disputes over Israeli settlements in the West Bank and the role of Hamas in the Palestinian leadership.
At the same time, Obama reiterated unwavering U.S. support for Israel's security Thursday, and he endorsed certain negotiating positions of Netanyahu's government, including an incremental handover of security responsibilities by Israel when conditions on the ground allow it.
He also said a future Palestinian state would have to remain "nonmilitarized."
Obama sought to undercut momentum for a declaration of Palestinian statehood at the United Nations in September, warning that "symbolic actions to isolate Israel (at the U.N.) won't create an independent state."
The president said he recognizes that two "wrenching and emotional issues" remain unresolved: the future status of Jerusalem, which is claimed by both sides, and the fate of Palestinian refugees who claim Israel as their homeland.
Netanyahu, considered hawkish on security matters, reacted coolly to the president's speech. He has argued that the 1967 borders are now "indefensible" for Israel, and noted that major population centers are located beyond those lines.
Hamas also rejected the terms outlined in the speech, calling them "empty of concrete significance."
Israel, meanwhile, announced the approval Thursday of new projects to build 1,500 housing units in Har Homa and Pisgat Zeev, which are outside the 1967 borders. The projects had previously received initial approval, said Roye Lackmanovich, an Interior Ministry spokesman.
Israeli officials said before Friday's meeting that Netanyahu intended to use the occasion not only to stress his opposition to a restoration of the 1967 lines, but also to seek specifics on the type of security guarantees envisioned by the president, including the assertion that a Palestinian state would remain nonmilitarized.
Netanyahu also wanted Obama to clarify his stance on both Hamas and the so-called "right of return" for Palestinian families who left Israel after the state's founding in 1948. Israel has repeatedly warned that it cannot allow those families to return without sacrificing its identity as a Jewish state.
Netanyahu made clear after Friday's meeting that the families of the 1948 refugees cannot settle within Israel's borders.
While Netanyahu and other conservative members of the Israeli government have been critical of Obama in the wake of Thursday's speech, the president also has defenders within the Knesset, Israel's parliament.
Tzipi Livni, an opposition leader and former foreign minister, applauded Obama's call for a two-state solution.
"An American president that supports a two-state solution represents the Israeli interest and is not anti-Israeli," Livni said. "President Obama's call to start negotiations represents Israel's interests."
Also, the group known as the Middle East Quartet -- which includes the United Nations, Russia, the European Union and the United States -- issued a statement Friday offering its "strong support" for Obama's "vision of Israeli-Palestinian peace."
The White House has been heavily focused on Middle East issues this week. Obama met with Jordan's King Abdullah II on Tuesday and will address the American Israel Public Affairs Committee, an influential pro-Israel lobbying group, on Sunday.
CNN's Elise Labott, Kevin Flower and Tom Cohen contributed to this report.