JERUSALEM — Israeli and Palestinian teams flew to Washington on Monday to end five years of diplomatic stalemate and prepare for a new round of Mideast peace talks, though optimism was in short supply after two decades of failed attempts to reach a deal.

The resumption of talks was made possible by a decision by Israel’s Cabinet on Sunday to free 104 long-held Palestinian prisoners in four stages, linked to progress in talks. The release was part of an agreement brokered early this month by U.S. Secretary of State John Kerry to bring the sides back to the negotiating table.

Palestinian President Mahmoud Abbas has been reluctant to negotiate with Israeli Prime Minister Benjamin Netanyahu, fearing the hard-line Israeli leader will reject what the Palestinians consider minimal territorial demands.

The Palestinians want a state in the West Bank, Gaza and east Jerusalem, territories Israel captured in 1967, but have accepted the principle of limited land swaps to allow Israel to annex some of the dozens of settlements it has built on war-won lands.

Abbas had repeatedly said he will only go to talks if Israel either freezes settlement building or recognizes the 1967 lines as a starting point for drawing the border of a state of Palestine.

Palestinian officials reiterated Monday that they received U.S. assurances that Washington considers the 1967 lines the basis for border talks.

However, a senior Abbas aide acknowledged that Israel has not signed on to that principle. He spoke on condition of anonymity because he was not authorized to discuss the issue.

Senior Israeli officials have also reiterated in recent days that settlement construction would continue.

The Palestinian official said the expected prisoner release went a long way toward persuading Abbas to give negotiations another chance, even without Israel meeting his longstanding demands on the terms of such talks.

The two teams were to meet for the first time later Monday in Washington for discussions that will not deal with the fundamental issues of the Israeli-Palestinian conflict, but rather aim to lay the foundations for full-fledged peace talks later this year.

The U.S. State Department said the teams would try to establish a work plan for the broader negotiations, which are to last six to nine months.

Israel is represented by chief negotiator Tzipi Livni and Yitzhak Molcho, a veteran Netanyahu adviser. The Palestinian team consists of chief negotiator Saeb Erekat and Abbas aide Mohammed Shtayyeh.

The actual negotiations are to be held in the region.

Livni said before her departure for Washington that she is going to the talks “cautiously, but also with hope.”

Hanan Ashrawi, a Palestinian spokeswoman, said the talks are being held under more difficult conditions than previous negotiations.

She cited the Palestinian political split, with Western-backed moderate Abbas and the Islamic militant Hamas running rival governments in the West Bank and Gaza, as well as the more hawkish positions of Netanyahu, compared to his predecessor.

“But I think there is a recognition of the urgency,” she said. “If we don’t move fast and decisively, things could fall apart.”

Hamas, which seized Gaza from Abbas in 2007, has dismissed the new talks, and the militant movement’s spokesman Sami Abu Zuhri on Monday rejected the notion that Abbas is representing the Palestinians.

Resuming negotiations “is a dangerous step and the only beneficiary is the occupation (Israel), which uses it as a cover for its continued crimes,” Abu Zuhri said.

Hamas wants to establish an Islamic state in all of historic Palestine, including Israel, and has made clear it would not consider a partition deal to be the end of the Israeli-Arab conflict.