Israeli and Palestinian security officials agreed in principle Friday on the terms of an Israeli pullback from parts of the Gaza Strip (search), Palestinian officials and Israel TV said.

The progress on Israeli withdrawal, coupled with an agreement by militant Islamic groups to temporarily cease attacks on Israelis, provides a boost to a U.S.-backed peace plan, the "road map" to Palestinian statehood by 2005.

As part of a U.S.-backed peace plan, Israel must gradually withdraw from areas it reoccupied during the past 33 months of fighting. Israeli-Palestinian negotiations on the terms of the withdrawal from Gaza areas had been deadlocked for several weeks, in part over who would control the main north-south road.

The deal was reached in a meeting between security officials from both sides, according to Palestinian officials and Israel TV.

Israel, which is expected to start pulling back troops on Monday or Tuesday, has promised to allow Palestinians freedom of movement throughout the Gaza Strip and Bethlehem. It also promised to halt targeted killings of Palestinian militants, TV reported.

In return, the Palestinian Authority (search) will assume security responsibility for the area and promises to act against any Palestinian assailants planning attacks against Israel, the report said.

U.S. officials in Israel to monitor implementation of the "road map" peace plan will oversee the withdrawal, TV said.

Meetings were planned Sunday at the Erez crossing into Gaza and in Bethlehem to discuss implementation of the agreement, a Palestinian official said on condition of anonymity.

Earlier Friday, a senior militia official said the Hamas (search) and Islamic Jihad (search) groups have agreed to a three-month suspension of attacks on Israelis, the first confirmation by the militants that such a deal has been reached.

The comments came despite an Israeli army raid earlier Friday in which three gunmen -- two from Hamas -- and a bystander were killed in a two-hour gunbattle.

A formal truce announcement is to be made Sunday, a Palestinian mediator said.

Hamas has informed the Palestinian prime minister of its decision on a three-month cease-fire, the founder of the group, Sheik Ahmed Yassin, said Friday. But he stopped short of declaring acceptance, saying Hamas still needs to consult other Palestinian groups first.

"We have presented our decision to the factions so that we don't announce an independent decision, and so that the decision will be a group decision, with all the Palestinian factions," he told The Associated Press. "There will be a joint declaration within days."

Condoleezza Rice, the U.S. national security adviser, is to arrive in the region Saturday as President Bush's personal envoy to discuss implementation of the plan -- halting until now -- with the leaders of both sides.

Israel has shrugged off the truce offer as an internal Palestinian matter and has said it will continue to go after militants it fears endanger Israel's security.

"In our opinion, a cease-fire will not help," said David Faranga, an Israeli Foreign Ministry spokesman. "What is needed is the dismantling of the terrorist infrastructure and war on terror. From our point of view a cease fire is a ticking bomb."

Israel fears a temporary truce will allow the militants to recover from the punishing strikes Israeli troops have delivered in the past year and regroup for more violence. However, Palestinian Prime Minister Mamoud Abbas has said he will not use force against the armed groups, for fear of causing civil war.

En route to the Middle East, Rice called on the European Union to outlaw the political wing of Hamas to dry up the flow of donations to the group, which has killed hundreds of Israelis in bombings and shootings.

A troop pullback would be the first major step by Israel toward implementing the peace plan, which calls on Israel to return to positions it held before the outbreak of fighting in September 2000. Bush launched the plan June 4, but its implementation has been rocky until now.

The truce agreement was worked out between Marwan Barghouti, the jailed West Bank leader of Yasser Arafat's Fatah movement, and heads of Hamas and Islamic Jihad in Damascus, Syria -- Khaled Mashal and Ramadan Shalah.

The Associated Press reported Wednesday, citing a Fatah legislator involved in negotiations, that Mashal and Shalah had agreed to the proposal.

However, local Hamas and Islamic Jihad leaders in the Gaza Strip initially denied there was a deal, and then said it had not been finalized and needed more study.

Providing confirmation from the Gaza militants themselves, a senior militia leader told the AP that Hamas and Islamic Jihad have accepted the proposal. "The trilateral document is now ready," the official said Friday, referring to the truce deal.

Ahead of a formal announcement Sunday, talks will continue with 10 smaller factions to have them sign the agreement as well, the official said, speaking on condition that neither he nor his group be identified.

The military wings of Hamas and Islamic Jihad and a Fatah-allied militia have been responsible for the vast majority of scores of shootings and bombings that have killed hundreds of Israelis in the past 33 months of fighting. It appeared very unlikely any of the smaller groups would oppose the deal, now that Hamas and Islamic Jihad are on board.

Throughout the day, Hamas and Islamic Jihad officials had been hinting strongly that they have accepted the agreement.

"A plan for a truce ... will be announced along with other Palestinian factions at the right time," Mahmoud Zahar, a Hamas leader, he told Lebanon's Al Hayat-LBC satellite television from Gaza.

Mohammed al-Hindi, the Islamic Jihad leader in Gaza, told Al-Jazeera satellite TV that "in a short time we will have a final document," adding that it would be presented to Abbas before being formally announced.

One demand -- but not a precondition -- of the truce is that Israel halt all military strikes, including targeted killings of wanted Palestinians.

The target of Friday's raid, top Hamas bombmaker Adnan al-Ghoul, also known as "The Engineer," was not present. Al-Ghoul, wanted for more than a decade, has supervised the construction of homemade rockets Hamas has been firing at Jewish settlements and Israeli border towns.

In the raid, an Israeli commando team surrounded the home of the bombmaker's brother Omran al-Ghoul in the village of Mujarkha in the central Gaza Strip.

A gunbattle erupted between soldiers and dozens of armed Palestinians. Omran al-Ghoul, a Hamas operative, as well as the bombmaker's 19-year-old son, Mohammed, and an Israeli soldier were killed. In a separate clash nearby, a bystander and another gunman were killed, Palestinian hospital officials said.

Palestinian witnesses said they heard 17 tank shells being shot during the battles, and that helicopters fired incessantly.

Thousands of Palestinians marched in a funeral procession for the four Palestinians killed and called for revenge. Some in the crowd shouted out a warning for Abbas, who is also called Abu Mazen: "Abu Mazen, listen closely. There is nothing except resistance."