Israeli tanks drove into a neighborhood in the West Bank city of Nablus and the army said five Palestinian militants were killed in exchanges of fire Tuesday, while Israeli troops started to pull out of the nearby town of Tulkarem.

The five Palestinians were killed when the army tried to arrest suspected militants in the Al Majeen neighborhood, the army said in a release. Troops took over one five-story building where an explosives factory was located, the army said.

Palestinian witnesses said explosions and exchanges of fire were heard from the building but Palestinian security officials did not immediately confirm any casualties from the takeover.

The Nablus raid appeared to be focused only on the neighborhood, Palestinian security officials said. Four soldiers were lightly injured in the raid, the army said.

Findings at the explosives laboratory showed that the militants intended to carry out an attack in the near future, the army said. A total of nine suspected militants were arrested in the raid on the neighborhood, the army said.

In Tulkarem, tanks and soldiers started pulling out of the northern sections of the city at dawn Tuesday, about 30 hours after they had entered, the army and Palestinian security officials said.

The military took over the entire Palestinian town on Monday, a first in 16 months of fighting and another blow to beleaguered Palestinian leader Yasser Arafat.

The military said Israeli troops started to pull out of Tulkarem early Tuesday.

Dozens of tanks rumbled through the streets of Tulkarem, emptied by a military curfew. Troops firing tank-mounted machine guns fought with Palestinian militiamen and rounded up suspected militants. The exchanges of gunfire went on through the night. Three Palestinians were killed and 23 wounded in clashes in Tulkarem and in the West Bank town of Ramallah.

Israel radio said 18 people were detained for questioning in Tulkarem.

Israeli military officials, speaking on condition of anonymity, said Israeli troops began pulling out of Tulkarem on Tuesday morning. Israel had said soldiers would be withdrawn from Tulkarem as soon as the army finished making arrests in the town of about 50,000.

Israel said the seizure was in response to lethal attacks on Israelis and that it was doing the job Arafat failed to do — rounding up militants.

Israeli government officials have said that in addition to Tulkarem, other Palestinian towns might be targeted.

The Palestinians accused Israeli Prime Minister Ariel Sharon of trying to bring down Arafat and destroy all prospects for a resumption of peace talks.

A defiant Arafat said the Palestinians would resist the Israeli incursion, saying Israel "crossed all the red lines" by taking over Tulkarem.

"Our people will never keep silence about all of these Israeli attacks," he told visitors at his headquarters in the West Bank town of Ramallah, which has been surrounded by Israeli tanks since Friday.

In a rare reference to his own mortality, Arafat also suggested he might not be around to see the establishment of a Palestinian state. "I swear to God I will see the Palestinian state, as a martyr or while still alive," Arafat said.

Israel's Cabinet has not formally decided to try to topple Arafat, and government officials have said the latest actions were intended to pressure him to crack down on militants.

Israel has raided Palestinian-ruled areas many times since fighting broke out in September 2000. However, Monday marked the first time Israel took control of an entire major Palestinian town since Palestinian self-rule began in 1994.

The raid came as a reprisal for a shooting attack last week by a Palestinian militant on a banquet hall in the Israeli town of Hadera. The gunman, who set out from Tulkarem according to the army, killed six Israelis before being shot dead by police. Palestinian militants said they launched the Hadera attack after the death of a militant leader in Tulkarem, blamed on Israel.

Tanks rumbled into Tulkarem, a town of about 50,000 Palestinians, at 3 a.m. Monday. "We saw the tanks coming and we ran," said Palestinian policeman Jihad Abu Tawfik, 47.

Elsewhere, Israeli troops met with resistance, especially in the adjacent Tulkarem refugee camp to which many gunmen had fled. Tanks had difficulty entering some of the camp's alleys and groups of children followed the gunmen around as they fired at armored vehicles.

The town of Tulkarem was largely deserted, and shops were shuttered. In the center of town, five armored personnel carriers were parked in front of a six-floor shopping center. Troops had draped camouflage netting across the entrance.

Soldiers took over key buildings, including a local college and the villa of the mayor, sandbagging rooftops and hoisting Israeli flags there.

"They came and knocked on the door at about four in the morning," said the mayor, Mahmoud Jalad. "For three hours, they kept me, my wife and three daughters out in the cold. Then they allowed me to sit in a corner of my house with my family and they said, `no bathroom."'

Witnesses said soldiers also took over offices of the Palestinian Authority and the Palestinian legislative council, as well as a makeshift police operations room. Tulkarem's main government compound, which contained the police headquarters, was destroyed last week in an Israeli air strike after the banquet hall attack.

Soldiers went from house to house looking for suspected militants, including members of the Al Aqsa Brigades, a militia linked to Arafat's Fatah movement. Israeli reports said more than 20 suspects were detained. In one area, soldiers guarded four handcuffed and blindfolded Palestinians lying on the floor of a room.

In Ramallah, Palestinian gunmen exchanged fire with Israeli troops for several hours Monday. The gunmen, some wearing black ski masks, took cover behind buildings and from there aimed at Israeli tanks.

Israeli troops returned fire from tank-mounted machine guns. At one point, several gunmen were standing together when Israeli fire hit one of them who fell to the ground. Shouting in panic, the others tried to drag away the body. Nine Palestinians were wounded.

For the past month, Israel has barred Arafat from leaving Ramallah, saying he can only travel again once he arrests the killers of an Israeli Cabinet minister and those responsible for a large seaborne weapons smuggling operation Israel said was plotted by the Palestinian Authority.