Founders and leaders of Hamas have made a rare public appearance together to assert the Palestinian militant group's right to continue its armed campaign.

They spoke in Gaza only two days before Israel is due to start pulling settlers and troops out of the territory.

The group has largely kept to a truce with Israel called in February by the Palestinian Authority's president.

But it has defied Mahmoud Abbas' calls to disarm in preparation for Israel's withdrawal and the transfer of power.

Palestinian security forces were deployed around the Gaza settlements on Saturday to positions not occupied since the intifada erupted nearly five years ago, in preparation for the withdrawal, Palestinian sources told AFP news agency.

Inside the settlements all was reported to be quiet on Saturday's Sabbath.

On Monday those who have not yet left will be asked by Israeli soldiers to depart. If they refuse they are expected to be dragged away.

A BBC correspondent says thousands of protesters have made it into the settlements to prepare for the confrontation.

Saturday's gathering of Hamas leaders was the biggest in public for more than a decade.

One of them, Ismail Haniya, was surrounded by four founding members of the group as he addressed reporters in a restaurant in Gaza City.

"Hamas confirms it is committed to armed resistance, it is our strategic choice until the end of the occupation of our land," he said.

"Our land, including Jerusalem, is still occupied, the refugees are still deported, the wall and the settlements are still eating more of our land."

Defiance

The Hamas leaders positioned themselves in front of their green flag and draped themselves in the group's colour, defying Palestinian Authority (PA) officials, who said on Friday that only the red, black, green and white Palestinian banner should be used to celebrate Israel's withdrawal.

The PA organised a rally of fishing boats

On Friday the PA organised a fishing boat rally in the harbour of Gaza City to celebrate the imminent pullout, where Mr Abbas told crowds that Palestinians were on the path to an independent state.

Tensions between the PA - dominated by Mr Abbas' Fatah party - and Hamas are high in the run-up to withdrawal, for which both claim the credit.

Hamas is planning to run in parliamentary elections in January.

Last month clashes broke out when Palestinian security forces tried to prevent Hamas members firing rockets at Israeli settlements in Gaza.

Mr Haniya played down the rivalry, but made clear Hamas intended to take part in governance after the withdrawal.

"Hamas is not a replacement for anyone. It is not a power within the Palestinian Authority and it is not confronting it. But Hamas rejects the idea of allowing any party to monopolise decision-making process," the Hamas leader said.