Palestinian president Mahmoud Abbas and the Islamic militant group Hamas have taken another step towards reconciliation, bringing the prospect of a Hamas-Fatah unity government even closer.

Abbas and Hamas leader Khaled Meshaal agreed to head a unity government that would prepare for elections in the West Bank and Gaza Strip.

The unity government would pave the way for the parliamentary and presidential elections that could are set to take place later in the year.

The two former opposing Palestinian factions met and signed the agreement in Doha, Qatar.

Hamas and Fatah had already agreed to form a unity government and hold elections within a year in May 2011, when they held talks in Cairo.

The pact was delayed after they failed to agree on the governing arrangement, but they now appear to have come closer to an agreement.

No timetable for the agreement has yet been announced.

In recent months, various Arab and regional powers have tried to become more involved in the reconciliation process, proving that brokering a deal between the two Palestinian factions could provide the 'mediator' with greater regional influence .

Fatah-Hamas Deal: Who will it Benefit?

Fatah's Motivations: With stalled negotiations, the Obama administration seemingly abandoning its demand that Israel freeze its settlements, the overthrow of the Mubarak, one of Fatah's former patron and protectors and an unfruitful UN statehood bid, Fatah's alliance with Hamas is not surprising.

Hamas' motivations: Following an 11-months uprising in Syria challenging the regime of president Bashar al-Assad, one of Hamas main protector in the region is falling apart. Forced to distance itself from the Assad regime, the militant group is now faced with losing one of its main patrons. With one of the world's worst rate of unemployment in 2010 according to the UN and a dire economic situation, Hamas' popularity is also being tested. An alliance with Fatah is thus a logical avenue for the militant group as it would also enable it to enter mainstream politics.

Regional Powers in Competition:

Egypt, Turkey, Saudi Arabia, Qatar and Jordan have been involved in the Hamas-Fatah talks , leaving Syria and Iran increasingly isolated.

Egypt: With the fall of the Mubarak regime and the emergence of the Muslim Brotherhood's Freedom and Justice Party as one of Egypt's largest political force, the support bases have dramatically changed.

Hamas being an offshoot of the Muslim Brotherhood, it naturally beneficiates from the Egyptian movement's backing.

While Mubarak has left power many of the military elements of his regime are still in the current government, also giving Fatah a line of support.

Analysts have viewed Egypt's central role in the Hamas-Fatah reconciliation process as a way to make both Israel and the US nervous while it has helped maintained its strategic importance and regional influence

Syria: Al-Assad welcomed the unity deal, which in its view helps increasing pressure against the US and Israel. However, the 11 months uprising has diplomatically ostracised the Assad regime. While it used its connection to Hamas and Hezbollah to act as a regional power that could reign down or bolster instability, it has now lost its position as a potential mediator in Middle East issues such as the potential settlement of the Israeli-Palestinian conflict.

Turkey: Turkey's prime Minister, Recep Tayyip Erdogan's Justice and Development party was one of the first to welcome the unity deal. However Turkey was noticeably absent from the Cairo agreements preparations and Egypt only invited Foreign Minister Ahmet Davutoglu to the final Cairo talks at the last minute, proving the Turkish/Egyptian struggle for regional influence is till very much on.

Turkey has nonetheless provided a platform for talks between the two Palestinian factions in Ankara in May 2011, and has implied it can play an important role in convincing Hamas to be more moderate.

As the situation in Syria becomes increasingly critical, Turkey's role has been side-lined by the Arab League, but both have failed to convince Assad to leave or prepare for transition.

Iran: Since the 1979 Islamic revolution Iran openly stands against Israel and supports Hamas.

Despite Iran's close ties with the militant group it remained outside the unity deals negotiations, proving its role in influencing Hamas' behaviour might not be as important as first assumed.

While the legitimisation of Hamas can help Iran further its own regional goals, it can also diminish its ability to directly use it as a proxy tool to undermine Israel. Syria is Iran's closest Arab ally, and if the Assad regime falls, the Islamic republic could see itself further isolated by Arabs regime hostile to it such as Saudi Arabia.

Saudi Arabia: Saudi Arabia has welcomed the Hamas-Fatah unity deal and urged world leaders to back the plans. It has in the past been involved in trying to bring the two factions together but failed. Saudi Arabia's relationship to Hamas and Fatah is not entirely clear. While Hamas is financially backed by many Saudi individuals and organisations, the regime has traditionally chosen to support Fatah.

Iran's ties to Hamas help explain Saudi's tendency to favour Fatah.

Qatar: Qatar has become more involved with the Hama-Fatah reconciliation process, acting as a mediator between the two. It has also offered to play a role in trying to reignite Israeli-Palestinian negotiations.

The crown prince of Qatar, Sheik Tamim bin Hamad al-Thani, recently accompanied Hamas leader Khaled Meshaal to Jordan.

Qatar's rapprochement with Hamas could aim at diminishing the group's ties to Iran and bring it closer to the Gulf's countries influence.

Qatar also hosts the group's spiritual leader Yusuf Al-Qaradawi and has in the past financially support the group.

Jordan: Jordan's ties to Hamas were severed in 1999, after it expelled its leader for their 'illicit and harmful" activities. Mershall, who holds a Jordanian passport, had prior to the meeting only been allowed in the country twice.

While Jordan played down the significance of the meeting, analysts claimed Hamas could be looking for a new host following its move from its Syrian headquarters.

The meeting has been interpreted as a sign that Hamas is slowly walking away from its radical tendencies as the Jordanian visit could helping rebrand its image as a more acceptable main-stream political party.