Israeli Defence Minister Shaul Mofaz and Palestinian Interior Minister Nassr Yousef reached the deal on Wednesday after weeks of disagreement over how to jointly bar Palestinian armed factions from taking over Gaza and staging attacks after the withdrawal.
Major resistance groups agreed to a de facto ceasefire in February at the behest of moderate Palestinian President Mahmoud Abbas. The truce has sharply reduced violence but has been prone to violations that could complicate the pullout.
Earlier on Wednesday, an Israeli aircraft fired three missiles at fighters in the Gaza Strip, causing no casualties in a strike the army said was a response to mortar fire at a Jewish settlement.
Under international law, Jewish settlements built on occupied Palestinian land are illegal.
Israel plans in mid-August to begin evacuating all 21 Jewish settlements it has built on occupied land in the Gaza Strip and four of 120 in the West Bank. The pullout is expected to take about a month.
"The two ministers agreed to coordinate the security side of the withdrawal at the ministerial level and on the level of security planning," Tawfiq Abu-Khoussa, a spokesman for Yousef, said, adding that teams from both sides would meet next week.
"They plan to tackle every detail of the withdrawal plan," Abu-Khoussa said.
An Israeli Defence Ministry official said there would be "coordination in the field" to enable the Palestinians to deploy security forces to "make sure that militants don't take over" areas vacated by Israel.
Many Israeli settlers have vowed
to resist evacuation from Gaza
Israel would inform the Palestinians in advance when settlements were to be evacuated so "the Palestinians would take care that terrorist groups don't interfere", the official said.
Israel had long urged the Palestinian Authority to help coordinate the pullout, particularly by reining in armed fighters who have often targeted Gaza settlements during 4 1/2 years of conflict.
But Palestinian officials had balked. Some stormed out of a meeting on Monday night, accusing their Israeli counterparts of poor faith by failing to present them with information on the settlements.
Rash of violence
Abu-Khoussa said Wednesday's meeting in Tel Aviv was "positive" despite a rash of violence in Gaza this week.
Mofaz and Yousef also discussed Israel's long-promised handover of security responsibilities for three West Bank cities and would pursue the issue again next week, Abu-Khoussa said.
Aljazeera's correspondent in Ram Allah, Shirin Abu Aqla, said the meeting was the third between the two sides.
Israel wants to send a warning message to the Palestinian side, particularly after the tense atmosphere during the past days, she said.
According to leaked news, Mofaz said Israel's patience might run out.
Israel is concerned about maintaining calm during the pullout and fears that its forces might come under gunfire while withdrawing.
Mofaz wants to get acquainted with the Palestinian preparations in this respect.
Israel does not want big demonstrations and operations targeting its troops.
Some Palestinian sources said the meeting was positive and the Palestinian side presented arrangements it is making.
On the other hand, Yousef called on the Israeli side to pledge implementing the security side, closing the file of wanted Palestinians and beginning with withdrawal from the West Bank cities, Aljazeera's correspondent said.
Israel has relinquished control over two West Bank cities, Jericho and Tulkarim, that it recaptured when a Palestinian uprising began in September 2000.
But it has delayed progress on three others to demand that the Palestinians rein in fighters.