Washington (CNN) -- President Barack Obama on Thursday made official the long-held but rarely stated U.S. support for a future Palestinian state based on borders that existed before the 1967 Middle East war.

In the past, the United States has unofficially backed a two-state solution to the Israel-Palestinian conflict based on the borders in place prior to the war 44 years ago in which Israel seized the West Bank, Gaza Strip, Golan Heights and Sinai Peninsula.

In a major speech Thursday, Obama became the first president to formally endorse the policy, but he also acknowledged the need for modifications through the negotiating process due to conditions on the ground.

"The United States believes that negotiations should result in two states, with permanent Palestinian borders with Israel, Jordan, and Egypt, and permanent Israeli borders with Palestine," Obama said in the concluding section of his 45-minute address that looked at political and social change sweeping across the Middle East and North Africa.

"We believe the borders of Israel and Palestine should be based on the 1967 lines with mutually agreed swaps, so that secure and recognized borders are established for both states," Obama continued.

His position agreed with the Palestinian negotiating stance on border issues in the staggering peace process, now stalled again by disputes over Israel settlements in the West Bank and the role of Hamas -- a terrorist group in the eyes of the United States and Israel -- in the Palestinian leadership.

At the same time, Obama reiterated unwavering U.S. support for Israel's security, and he endorsed major negotiating positions of Prime Minister Benjamin Netanyahu's government, including an incremental handover of security responsibilities by Israel when conditions on the ground allow it.

Obama declared the U.S. commitment to Israel's security "unshakable," and said "every state has the right to self-defense, and Israel must be able to defend itself -- by itself -- against any threat."

"Provisions must also be robust enough to prevent a resurgence of terrorism; to stop the infiltration of weapons; and to provide effective border security," Obama continued, touching on the major concerns of Israel in facing a new Palestinian neighbor. "The full and phased withdrawal of Israeli military forces should be coordinated with the assumption of Palestinian security responsibility in a sovereign, non-militarized state. And the duration of this transition period must be agreed, and the effectiveness of security arrangements must be demonstrated."

In a later interview with the BBC, Obama said that "the basis for negotiations will involve looking at that 1967 border, recognizing that conditions on the ground have changed and there are going to need to be swaps to accommodate the interests of both sides."

"That's on the one hand and on the other hand, and this was an equally important part of the speech, Israel is going to have to feel confident about its security on the West Bank and that security element is going to be important to the Israelis." Obama said in the interview.

Tony Blair, the former British prime minister now working as part of international efforts to secure an Israeli-Palestinian peace agreement, said the security assurances and provisions are essential to the territorial issue.

"I think it's saying in essence, that the Palestinians have got to be sure that their state is viable in terms of territory," Blair told CNN shortly after Obama spoke. "Obviously, there are going to be deviations or changes (from the exact 1967 borders) that are mutually agreeable."

On the other hand, Blair said, Israel has the right to protect itself.

As expected, initial reaction was mostly negative. A statement from Netanyahu's office rejected what it called a withdrawal to the 1967 borders, calling them "indefensible" and noting it would leave major Israeli population centers in Palestinian territory. Hamas also rejected the speech.

Political opponents also criticized Obama, with possible Republican presidential candidate Mitt Romney saying the president had "thrown Israel under the bus."

"He has disrespected Israel and undermined its ability to negotiate peace," Romney said in a statement. "He has also violated a first principle of American foreign policy, which is to stand firm by our friends."

The president used his speech to speak directly to both Israel and Palestinians, declaring that both sides must yield on some deeply entrenched positions in order to bring peace that is desired and needed by both the region and the world.

He criticized both sides for "unmet" expectations despite decades of efforts by U.S. administrations, including his own, to facilitate an agreement.

In particular, Obama cited Israel's insistence on building new housing settlements on the West Bank and other areas beyond its 1967 borders. On Thursday, Israel announced the approval of projects to build 1,500 housing units in Har Homa and Pisgat Zeev, which are outside the 1967 borders. Roye Lackmanovich, an Interior Ministry spokesman, said the projects had previously received initial approval.

"The status quo is unsustainable, and Israel too must act boldly to advance a lasting peace," Obama said, adding that "the dream of a Jewish and democratic state cannot be fulfilled with permanent occupation."

Obama also rejected any Palestinian effort to challenge Israel's right to exist, saying they would "end in failure." He noted an expected push for a symbolic U.N. General Assembly resolution in September "won't create an independent state."

While calling for positive steps by both sides on territory and security issues, Obama said he recognized 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.

Obama also repeated the strong U.S. opposition to Hamas playing a leadership role unless it recognizes Israel's right to exist and renounces terrorism.

"The recent announcement of an agreement between Fatah and Hamas raises profound and legitimate questions for Israel -- how can one negotiate with a party that has shown itself unwilling to recognize your right to exist," Obama said. "In the weeks and months to come, Palestinian leaders will have to provide a credible answer to that question."

Netanyahu's statement cited the refugee and Hamas issues as major obstacles to renewed peace talks sought by Obama.

"Without a solution to the Palestinian refugee problem outside the borders of Israel, no territorial concession will bring peace," said the statement, adding that Netanyahu -- who will meet with Obama on Friday in Washington -- "will also express his disappointment over the Palestinian Authority's decision to embrace Hamas, a terror organization committed to Israel's destruction."

Obama acknowledged the "suspicion and hostility" that impeded the peace process, but added he was "convinced that the majority of Israelis and Palestinians would rather look to the future than be trapped in the past."