Israeli forces began pulling out of the Palestinian town of Beit Jalla early Thursday, witnesses said, hours after Israeli agreed to a withdrawal if calm was restored.

The pullout began two days after Israeli tanks and troops entered the village, following a heavy exchange of fire between Palestinian gunmen in the city and the Jewish neighborhood of Gilo, across a valley in a disputed part of Jerusalem.

The move came after a late-night meeting of top Israeli Cabinet ministers in Jerusalem, including Prime Minister Ariel Sharon, Defense Minister Shimon Peres and Defense Minister Binyamin Ben-Eliezer.

On Wednesday, Peres worked to stop the shooting between Palestinian gunmen and Israeli forces and to pull Israeli forces out of the town. Secretary of State Colin Powell talked with Peres and Palestinian leader Yasser Arafat, and Peres and Arafat talked several times on the telephone.

Witnesses said Israeli tanks and armored personnel carriers were heading out of Beit Jalla, after exchanges of gunfire stopped around midnight, five hours before the withdrawal began.

During the two days Israeli forces held positions in the town, Palestinian gunners continued to target Gilo, a Jewish neighborhood built on land captured by Israel in the 1967 war and annexed to Jerusalem. For the first time, they aimed 50-caliber machine-gun fire at the Jewish houses, and they also fired 60mm mortar shells.

During the incursion and exchanges of fire in Beit Jalla, one Palestinian policeman was killed and at least 20 people were injured, Palestinians said.

The State Department had welcomed the agreement and held out hope that the truce could be a springboard to a wider accord. "Stopping the violence is the way of getting there," State Department spokesman Richard Boucher said.

But the State Department heightened its criticism of the measures used by Israel in retaliation for terrorist attacks.

"I think we've seen incursions before," Boucher said. "There is a fundamental issue here, and that's trying to reverse agreements and understandings that have been made in the past."

The statement appeared a muted warning to Israel to reverse the Beit Jalla incursion, the longest-lasting of several into territory Israel turned over to the Palestinian Authority under the 1993 Oslo Accords.

Israel sent forces into Beit Jalla early Tuesday to try to quell Palestinian shooting from there at the nearby Jewish neighborhood of Gilo, built on war-won land Israel annexed to Jerusalem.

Instead, Israel's incursion led to use of heavier weapons by the Palestinians. For the first time, 50-caliber machine gun bullets hit Gilo, and five mortar bombs landed, causing damage but no casualties.

Israeli Defense Minister Binyamin Ben-Eliezer said Wednesday he had no plans to reoccupy Gilo. However, he said, if Palestinians resumed shooting on Gilo after an Israeli withdrawal, his troops would "absolutely" move back into Beit Jalla.

In 11 months of Israeli-Palestinian fighting, Israeli forces have repeatedly entered Palestinian territories, but stayed only a few hours. The incursion, the most extended, threatened to enflame violence to a new peak.

Hassan Abed Rabbo, a senior member of Arafat's Fatah movement in Beit Jalla, said his forces received instructions Wednesday afternoon from Arafat to stop shooting. "We are committed to these instructions," he said.

Wednesday morning, firefights raged between Israeli forces and Palestinian gunmen in Beit Jalla and the nearby Aida Palestinian refugee camp, and 13 Palestinians were injured. In a first sign that a truce was being enforced, witnesses said Palestinian security forces set up roadblocks at the entrance to Beit Jalla on Wednesday afternoon to keep gunmen out.

As part of the Israeli incursion, troops commandeered several rooftops of buildings with a view of the town. One was a Lutheran Church hostel. After a stiff protest from church leaders, the Israelis left the hostel early Wednesday.

Forty-five children in an orphanage next door, who had been confined indoors by the fighting and an Israeli curfew, were allowed outside to play Wednesday.

Ten-year-old Shihade Sharabati said he was frightened by the sound of heavy gunfire. "Today, we collected the empty bullets and we played with them," the boy said. "I will keep them as souvenirs."

Elsewhere in the Palestinian territories, four Palestinians and an Israeli were killed in ongoing violence. One of the Palestinians died in an ambush attack on his car. Police suspect Jewish extremists carrying out a retaliatory raid.

The dead Israeli was a fuel truck driver who was gunned down after delivering gas to a Palestinian village.

In Hebron, an officer in Force 17, an elite unit of Arafat's police, was killed by Israeli gunfire. The Israelis reported exchanges of fire in Hebron through the day, and 15 Palestinians were wounded, Palestinians said.

Palestinians said two Israeli tanks entered the Jelazoun refugee camp near Ramallah. The Israeli military said Palestinians fired at the settlement of Beit El from a car and escaped into the camp.

In 11 months of fighting, 595 people have died on the Palestinian side and 163 have died on the Israeli side.