The main Palestinian political rivals on Monday took a major step toward healing their bitter rift, agreeing that Palestinian President Mahmoud Abbas would head an interim unity government to prepare for general elections in the West Bank and Gaza Strip.

Abbas and Khaled Mashaal, head of Hamas, said they would move forward without delay, though it appears unlikely elections can be held in May, as initially envisioned.

Monday's agreement, brokered by Qatar, seemed to bring reconciliation within reach for the first time since the rivals established separate governments.

A year after winning elections, Hamas consolidated its control over Gaza in 2007, following a military conflict with Fatah, which remains in charge of most security operations in the West Bank.

Previous deals have collapsed amid deep suspicions and intervention by the sides' rival foreign patrons. Abbas is backed by the West while Hamas has been supported by Iran.

Israeli Prime Minister Benjamin Netanyahu condemned the new deal, saying it would be impossible to reach peace with a government that includes Hamas, which Israel and the West consider a terrorist group.

"Hamas is a terror organisation which strives to destroy the state of Israel and is supported by Iran," Israeli Prime Minister Benjamin Netanyahu in his response to the agreement. "I have said many times in the past that the Palestinian Authority must decide between a pact with Hamas and peace with Israel. Hamas and peace do not go together."

'Hamas and peace do not go together.'—Israeli Prime Minister Benjamin Netanyahu

A new attempt to restart low-level peace talks last month ended without a breakthrough.

Abbas and Mashaal had reached a reconciliation deal last year, but disagreement over who was to head an interim government had delayed implementation. Hamas strongly opposed Abbas' choice of Salam Fayyad, the head of his Palestinian Authority in the West Bank.

It remains unclear whether an Abbas-led interim government that is supported by Hamas would be acceptable to the West, which gives hundreds of millions of dollars of aid to the Palestinians each year.

The United States, Europe and Israel consider Hamas a terror organization, and said they would shun any government that includes members of an unreformed Hamas.

Abbas has international backing and Monday's agreement said all cabinet ministers would be politically independent technocrats. Fayyad, who would have to step down if a transitional government is formed, said he welcomed the agreement. It was not announced when the caretaker government would take office.

Monday's breakthrough came after two days of meetings between Abbas and Mashaal, hosted by Qatar's emir, Hamad bin Khalifa Al Thani. The two Palestinian leaders signed the agreement in a small ceremony at the emir's diwan, or meeting hall, in Doha.

"We promise our people to implement this agreement as soon as possible," Abbas said after the singing.

Mashaal devoted to 'resisting the occupation'

"We inform our people that we are serious about healing the wounds ... to reunite our people on the foundation of a political partnership, in order to devote our effort to resisting the (Israeli) occupation," added Mashaal.

The agreement also calls for rebuilding Gaza, which has been largely cut off from the world as part of an Israeli-Egyptian border blockade, imposed after the Hamas takeover in 2007.

The blockade was eased in the past year, but not enough to revive Gaza's economy, including the vital construction industry, and many large-scale projects remain on hold.

The Qatari leader urged the Arab world to stand behind the Palestinians' "historical rights," in an apparent reference for full statehood and return of lands occupied by Israel in the 1967 war.

The Arab world may have to step in if the West refuses to work with an Abbas-led interim government. The Palestinian Authority currently receives about $1 billion a year for its budget in foreign aid, and that money could be halted if the international community deems a new Palestinian government unacceptable.

With the Palestinians moving toward unity, the fate of low-level border talks with Israel also remains uncertain.

Abbas has said that the talks have run their course, as far as he is concerned, and that he would only resume them if Israel made a better offer on where to draw the border with a Palestinian state.

It is not clear whether Israel would negotiate with Abbas as head of a Palestinian unity government. Israeli officials had no immediate comment Monday.

'The Qatari sponsorship means [the unity government] is accepted by the West and will be funded by this wealthy Gulf state.'—West Bank political analyst Majid Sweilim

Abbas and Hamas have had bitter ideological differences, with Abbas pursuing a deal with Israel on the terms of Palestinian statehood and the more militant anti-Israel Hamas dismissing such talks as a waste of time.

In recent months, those differences seem to have narrowed. Abbas has lost faith in reaching a deal, at least with the current hardline Israeli government, while Mashaal has been prodding Hamas toward a more pragmatic stance that is closer to that of the group's parent movement, the pan-Arab Muslim Brotherhood.

However, Mashaal represents Hamas in exile and appears to have had differences with the movement's local leadership in Gaza.

Some of the Gaza leaders have resisted his push for reconciliation with Abbas and moving closer to the Brotherhood, Hamas officials have said privately. Still, Hamas' prime minister in Gaza, Ismail Haniyeh, welcomed the Doha deal, and a delegation from Gaza was present during Monday's signing.

Analysts said they believed this deal stood a chance where others had failed.

"There are several indications that this agreement is a serious one, and can be implemented," said Majid Sweilim, a political analyst in the West Bank. "The president at the helm of the government means it will be accepted by the West. The Qatari sponsorship means it's accepted by the West and will be funded by this wealthy Gulf state," he said.

"President Abbas is very interested in ending the split, particularly with the failure of the peace talks, and Khaled Mashaal is getting closer to the PLO position, in harmony with the changes of the Muslim Brotherhoods in the region," Sweilim added.