The two rival Palestinian factions, Hamas and Fatah, have struck a landmark agreement to form a single, united government in Gaza and the West Bank.

The militant, Islamist Hamas seized power in Gaza in 2007, ousting the secular Fatah to the West Bank.

Now, leaders of both factions have signed a deal in Cairo that will see the two governments replaced by a united, interim leadership until Palestinian elections are held by early next year.

"We announce to Palestinians that we turn forever the black page of division," Palestinian president Mahmoud Abbas, Fatah's leader, said in a speech.

But the new government will face enormous obstacles, not least of which Israel, which says it will not deal with any government that includes Hamas, and says Fatah must choose between peace with Hamas or peace with Israel.

Hamas, whose founding charter calls for Israel's destruction, seized the Gaza Strip from Fatah forces in a brief Palestinian civil war in 2007. It has opposed Mr Abbas's quest for a negotiated peace with the Jewish state.

Israeli prime minister Benjamin Netanyahu said during a visit to London: "What happened today in Cairo is a tremendous blow to peace and a great victory for terrorism".

Many Palestinians say the four years of warfare between Hamas and Fatah have undermined their campaign for peace with Israel.

The United States has been cautious about the Cairo ceremony.

State Department spokesman Mark Toner says the US continues to believe Hamas must recognise Israel's right to exist, reject violence and abide by interim peace agreements if it wants to play a meaningful role in the political process.

He says the US will look at the formation of any new Palestinian government before taking steps on future aid.

"It's important now that Palestinians ensure implementation of that agreement in a way that advances the prospects of peace rather than undermines them," he said.

"We'll wait and see what this looks like in real and practical terms... We still don't know what, if any changes, there will be at the governmental level."

Lingering friction

In what appeared a sign of lingering friction, Hamas leader Khaled Meshaal did not share the podium with Mr Abbas and the ceremony was delayed briefly over where he would sit. Against expectations, neither signed the unity document.

Hamas leaders will meet Mr Abbas next week, possibly in Cairo, to start work on implementing the accord, deputy Hamas leader Moussa Abu Marzouk said after the ceremony.

In his speech to the gathering, Mr Meshaal said Hamas sought a Palestinian state in the West Bank and Gaza devoid of any Israeli settlers and without "giving up a single inch of land" or the right of return of Palestinian refugees.

Challenging Israel to peace, Mr Meshaal offered to work with Mr Abbas and Egypt on a new strategy to solve the Arab-Israeli conflict but said he did not believe Israel was ready for peace.

"We have given peace since Madrid till now - 20 years - and I say we are ready to agree among us Palestinians and with Arab support to give an additional chance," Mr Meshaal said, referring to the 1991 international Middle East peace conference that launched Israeli-Arab peace talks.

"But, dear brothers, because Israel does not respect us, and because Israel has rejected all our initiatives and because Israel deliberately rejects Palestinian rights, rejects Fatah members as well as Hamas... it wants the land, security and claims to want peace."

Hamas has stated before it would accept as an interim solution in the form of a state in all of the territory Israel captured in the 1967 war, along with a long-term ceasefire.

Israel withdrew soldiers and settlers from Gaza in 2005. It has kept up settlement activity in the much larger West Bank.

The unity deal calls for forming an interim government to run the West Bank, where Mr Abbas is based, and the Gaza Strip, and prepare for long-overdue parliamentary and presidential elections within a year.

In his speech, Mr Abbas repeated his call for a halt to Jewish settlement construction as a condition for resuming peace talks with Israel that began in September but fizzled after the Jewish state refused to extend a limited building moratorium.

Mr Abbas is widely expected, in the absence of peace talks, to ask the UN General Assembly in September to recognise a Palestinian state in all of the West Bank and Gaza.

Israel and the United States oppose such a move.

"The state of Palestine must be born this year," Mr Abbas said.

Palestinians view reconciliation as an essential step towards presenting a common front at the United Nations and a reflection of a deep-seated public desire to end the internal schism amid popular revolts that have swept the Arab world.

But the deal presents potential diplomatic problems for Mr Abbas's aid-dependent Palestinian Authority.

- ABC/Reuters