Palestinian police were back on the streets of Bethlehem early Tuesday after Israeli forces left the town as part of a trial that could lead to further Israeli withdrawals in the West Bank.

In the first security accord between the two sides in more than a year, Israel agreed to hand control of Bethlehem and parts of the Gaza Strip back to the Palestinians. Israel said it would pull out of other West Bank population centers if Palestinian police try to prevent terror attacks from being launched from test areas.

But the understandings could quickly unravel. An Israeli soldier and two Palestinians were killed in fresh violence early Tuesday.

The violent Hamas and Islamic Jihad groups, responsible for dozens of suicide bomb attacks against Israelis during two years of fighting, rejected the agreement and pledged to step up their attacks.

Early Tuesday, an Israeli soldier was killed by Palestinian sniper fire aimed at an army post near the Jewish settlement of Gadid in the Gaza Strip, the army said. Hamas took responsibility for the killing.

A short while later, a 15-year-old Palestinian boy was killed in the nearby town of Khan Younis by army fire, hospital officials said. It was not clear if the boy was hit during an exchange of fire that followed the attack on the army post.

In the West Bank, one armed Palestinian was killed and at least one injured in an exchange of fire between Israeli troops and local militiamen in the Tulkarem refugee camp, the army said. The fighting erupted during an Israeli army raid of the camp. Troops backed by tanks and helicopters searched houses and rounded up suspects, witnesses said.

In Bethlehem, the Israeli military announced early Tuesday that the withdrawal was complete. Palestinian police began patrolling outside the Church of the Nativity and other parts of the ancient town after the last Israeli soldiers left.

It was a low-key withdrawal, because Israel had significantly thinned out its forces in the town in recent weeks, sending occasional jeep patrols to enforce a night curfew.

At the local police headquarters, a Palestinian officer replaced a tattered Palestinian flag atop a pole with a new banner. Other officers lined up in front of their station and heard their commander instruct them to patrol the streets, stop cars and arrest anyone who was carrying illegal weapons.

"We want the people to go back to their regular lives and to live in peace," said policeman Mohammed Fatahah, 29. "But we will not allow anyone to violate the law." Then he entered his police car, a blue light flashing on top, and set out on patrol.

A few cars were on the streets, but there were no street celebrations, apparently because of the late hour.

The military said it would ease restrictions in other areas if calm is maintained, but would continue to ``act against the threat of terrorism where the need arises.'' After the withdrawal, troops maintained a tight blockade of Bethlehem.

In the Gaza Strip, there were no signs of an Israeli troop withdrawal yet. Most Israeli forces are concentrated along the main north-south road in the strip. Tanks frequently close the road, preventing Palestinians from traveling from one end of Gaza to the other.

Israeli Defense Minister Binyamin Ben-Eliezer and the Palestinian security chief, Interior Minister Abdel Razak Yehiyeh, reached the first cease-fire agreement since June 2001, when CIA Director George Tenet brokered a truce that was never implemented.

In the areas from which Israelis withdrew, "we will take all the necessary procedures to achieve internal security and public security," Yehiyeh said.

In Washington, White House spokesman Ari Fleischer praised the agreement. "We hope this is a sign of more welcome developments to come," he said.

Previous attempts at cease-fires have crumbled under the weight of continuing Palestinian attacks and Israeli reprisals.

Shortly after violence erupted in September 2000, Israel imposed stiff restrictions on the West Bank and Gaza Strip, setting up roadblocks, cutting off cities and towns and devastating the Palestinian economy. Israelis explained that the measures were necessary to keep attackers out of the country, but Palestinians charged Israel's goal was to oppress the population and bring down Yasser Arafat's regime.

The situation has intensified in recent months. Responding to Palestinian suicide bombings, Israel has twice sent large numbers of troops into West Bank towns and cities.

In June, after back-to-back suicide bombings in Jerusalem, Israeli forces took control of seven of the eight main Palestinian population centers, imposing curfews and maintaining a tight grip. The pullout from Bethlehem was the first relaxing of the Israeli chokehold.

But Palestinian radicals threatened to torpedo the deal by continuing attacks.

Also, the council representing Israeli settlers in the West Bank and Gaza harshly criticized the deal. "This is a step that is counter to Israel's security interests," a council statement said. "The Palestinians should be defeated and the war brought to an end." Settlers have been frequent targets of Palestinian gunmen and bombers.