Rival Palestinian factions Fatah and Hamas have signed a reconciliation deal – the biggest step forward for internal Palestinian relations in a decade.

The signing of a preliminary agreement in Cairo on Thursday was reached after two days of Egyptian-brokered negotiations. Fatah negotiator Azzam al-Ahmed and Hamas’s representative Saleh al-Arouri smiled and shook hands in a short ceremony presided over by Egypt’s chief of intelligence, Khalid Fawzi.

The move should ensure a unity government will once again administer both the West Bank and Gaza after the rift caused by militant group Hamas’s takeover of the Gaza Strip in 2007.

Gaza marks 10 years of Israeli blockade

Gaza has been subject to both an Israeli blockade and Fatah strangulating the supply of electricity and other resources. This has crippled its economy and left much of the territory’s population of 1.8 million-strong dependent on aid.

The new deal – technically drafted in 2011 but never implemented – is understood to cover border-crossing arrangements and the livelihoods of thousands of public servants but not some key issues, such as Hamas’s arsenal.

Control of the Rafah border crossing between Gaza and Egypt – kept largely closed by Egypt for years – could be reopened and jointly operated as soon as 1 November, Mr Ahmad said.

Gaza blackout Show all 10 1 /10 Gaza blackout Gaza blackout A Palestinian man works at his workshop as he fixes mobile power generators in Gaza City, July 9, 2017. REUTERS Gaza blackout Palestinians pray in a makeshift mosque lit by battery-powered lights during a power cut in Gaza City, July 18, 2017. REUTERS Gaza blackout A Palestinian vendor sells fruits and vegetables during a power cut in a makeshift shop lit by battery-powered light in Beit Lahiya town, in the northern Gaza Strip, July 13, 2017. REUTERS Gaza blackout A Palestinian woman is seen from the window of her kitchen as she uses a candle light to prepare food during a power cut in Beit Lahiya town, in the northern Gaza Strip, July 13, 2017. REUTERS Gaza blackout Buildings are seen at night in Gaza City, July 18, 2017. REUTERS Gaza blackout Buildings are seen at night during a power cut in Gaza City, July 18 REUTERS Gaza blackout A Palestinian woman washes dishes in her kitchen as she uses a candle light during a power cut in Beit Lahiya town, in the northern Gaza Strip, July 13, 2017. REUTERS Gaza blackout Members of a Palestinian family prepare food on a fire on a beach during a power cut in the northern Gaza Strip, July 12, 2017. REUTERS Gaza blackout Palestinians make food during a hot weather on a beach during a power cut in the northern Gaza Strip, July 12, 2017 REUTERS Gaza blackout A Palestinian woman holds her child as she walks out of her house lit by a torch during a power cut in Khan Younis, in the southern Gaza Strip, July 3, 2017. REUTERS

Opening the border would significantly ease Gaza’s humanitarian crisis, allowing freedom of trade and movement out of “the world’s largest open air prison”. Both sides agreed to European Union monitors at Rafah in an attempt assuage Israeli fears over weapons smuggling.

The deal says an interim government will be formed and long-overdue local and presidential elections take place within one year of the signing. Other details have not yet been made public.

In the past, committees set up to implement similar complicated changes have quickly broken down.

Israel’s initial reaction to the news from Cairo was cautious. Any deal must comply with “international agreements” including recognising the state of Israel and disarming Hamas, a statement said.

Trump: Israelis and Palestinians are 'reaching for peace'

The two sides were determined not to leave Cairo without a “final agreement that would put aside the rift forever”, he said, adding that both Fatah and Hamas wished to “achieve the Palestinian dream, put an end to occupation, and to have a Palestinian, independent, sovereign state with East Jerusalem as the capital.”

“We in Hamas are determined, serious and sincere this time and every time to end the division,” Mr Arouri said.

“We have adopted the strategy of one step at a time so that the reconciliation will succeed,” he added.

In Ramallah, Fatah’s Palestinian Authority President Mahmoud Abbas told reporters that he welcomed the agreement.

“I received a detailed report from the Fatah delegation about what was agreed and I considered it the final agreement to end the division,” he said.

Local media reports that provided the interim measures hold up, Mr Abbas will travel to Gaza in the next few weeks – his first visit to the Strip in 10 years.

The deal comes a month after Hamas dissolved the committee which runs the Gaza Strip and said it was willing to work towards a reconciliation with Fatah.

The two Palestinian Territories have been ruled separately since the Sunni militant Hamas won local elections in the Strip in 2006. A year of tense unity government administration ended after fighting in 2007 which led to Hamas expelling its rivals from the coastal enclave altogether.

Mr Abbas’s Fatah party seeks the creation of a Palestinian state within the borders of the 1967 Six Day War.