Updated

Israel and the Palestinians agreed Tuesday on a detailed arrangement for opening the borders of the Gaza Strip and allowing freer movement for Palestinians elsewhere, a significant step toward an eventual peace deal between historic enemies.

It took all-night negotiations and a strong diplomatic shove from Secretary of State Condoleezza Rice to get a deal whose basic elements had been in the works for weeks.

"I have to say as a football fan, sometimes the last yard is the hardest, and I think we experienced that today," Rice told a news conference where she announced the agreement.

She praised the deal at a news conference as a "big step forward" in Israeli-Palestinian relations, bruised by nearly five years of bloody fighting.

While important in and of itself, the broader significance of the deal to free up Palestinian movement while satisfying Israeli concerns about terrorism is that it makes a statement of progress that goes beyond the technical details.

Rice oversaw the marathon negotiations in a Jerusalem hotel, huddling alternately with Israeli and Palestinian negotiators in her suite. She had postponed a planned departure for Asia by a day to shepherd the deal to a conclusion.

On Tuesday morning, she met with Israeli Defense Minister Shaul Mofaz to finalize the details.

The agreement gives the Palestinians control over a border for the first time and provides a much-needed boost to the shattered Gaza economy. The deal also strengthens Palestinian leader Mahmoud Abbas ahead of Jan. 25 parliament elections and could help him fend off a strong challenge by the Islamic militant group Hamas.

Rice and international Mideast envoy James Wolfensohn badly wanted Israel and the Palestinian leadership to use Israel's unilateral withdrawal from the Gaza Strip last summer as traction for tougher peace negotiations down the road.

Cooperation flagged in recent weeks, and Rice's two days of meetings in Jerusalem and the West Bank were meant to push the two sides to settle nitty-gritty disputes over Palestinian movement in and out of the territory they now control. "Underneath what may seem like very small details there are hard issues," Rice told reporters.

She said she had about two hours of sleep.

Wolfensohn said the deal cleared the way for the international community to assist the Palestinians and help revive Gaza's economy. Donor countries have pledged hundreds of millions of dollars, but they money was held up by the lack of a border deal.

Under the agreement, the Gaza-Egypt border would tentatively open Nov. 25, under the supervision of European monitors. Israel had demanded veto powers, but in the ended conceded on the issue, said Palestinian negotiator Saeb Erekat. Israel will receive live transmissions via closed circuit TV from the crossing there, and can raise objections concerning travelers, but the Palestinians have the final say.

The European group will be headed by an Italian general, said Palestinian Information Minister Nabil Shaath.

Construction of a Gaza seaport is to begin soon, and Palestinians will be able to travel between the West Bank and Gaza in bus convoys, starting Dec. 15.

The deal came amid political upheaval in Israel that could topple Prime Minister Ariel Sharon's shaky coalition government. Sharon's junior partner, the Labor Party, chose a new leader last week who said he would pull the party out of the coalition.

Sharon's Likud Party is still deeply divided following the Gaza pullout. Several lawmakers in the traditionally hard-line party are still furious over what they regard as a tactical mistake and an emotional blow. Without Labor's support, it will be difficult for Sharon to maintain a parliamentary majority.

The Knesset, Israel's parliament, is scheduled on Wednesday to vote on a bill to dissolve parliament and force new elections. That could force elections within three months. The scheduled vote is November 2006.

The Palestinians have elections scheduled for January that the United States views as a test of the new leadership's democratic resolve.