Hamas and Fatah are the two most dominant parties in the Palestinian political scene.
On Thursday, the two movements announced they had reached a deal to end a decade-long rift that brought them to an armed conflict in 2007.
Hamas then pushed Fatah out of Gaza when the latter refused to recognise the result of the vote.
Hamas and Fatah have ruled the occupied Palestinian territories of the Gaza Strip and the West Bank respectively ever since.
While the two groups work towards the same goal of building a Palestinian state on the territories that Israel occupied in 1967, consisting of East Jerusalem, the Gaza Strip and the West Bank, there are some stark differences.
What are their ideologies?
Fatah is a reverse acronym for Harakat al-Tahrir al-Filistiniya or Palestinian National Liberation Movement in Arabic. The word Fatah means to conquer.
The secular movement was founded in Kuwait in the late 1950s by diaspora Palestinians after the 1948 Nakba - the ethnic cleansing of Palestine by the Zionist movement aiming to create a Jewish modern state in historic Palestine.
Fatah was founded by several people, most notably the late president of the Palestinian Authority - Yasser Arafat, aides Khalil al-Wazir and Salah Khalaf, and Mahmoud Abbas, who is the current president of the Palestinian Authority.
The movement was premised on the armed struggle against Israel to liberate historic Palestine.
The main military wing of the group was al-Asifah, or the Storm. Al-Asifah fighters were based in several Arab countries as well as in the West Bank and Gaza.
The group's armed struggle against Israeli occupation began in 1965. Most of its armed operations were carried out from Jordan and Lebanon.
Under Yasser Arafat, and after the 1967 Arab-Israeli War, Fatah became the dominant party in the Palestinian Liberation Organization (PLO), which comprises numerous Palestinian political parties. The PLO was created in 1964 with the goal to liberate Palestine, and today acts as the representative of the Palestinian people at the United Nations.
After being pushed out of Jordan and Lebanon in the 1970s and 1980s, the movement underwent a fundamental change, choosing to negotiate with Israel.
"The Arabs basically helped in forcing Fatah to agree on taking a diplomatic route, after it was pushed out of Beirut," Nashat al-Aqtash, a ًWest Bank-based political analyst, told Al Jazeera.
In the 1990s, the Fatah-led PLO officially renounced armed resistance and backed United Nations Security Council Resolution 242, which calls for building a Palestinian state on the 1967 borders (West Bank, East Jerusalem and Gaza), alongside an Israeli state.
The PLO then signed the Oslo Accords, which led to the creation of the Palestinian National Authority, or Palestinian Authority, an interim self-governing body meant to lead to an independent Palestinian State.
Hamas is an acronym for Harakat al-Muqawamah al-Islamiyya, or Islamic Resistance Movement. The word Hamas means zeal.
The Hamas movement was founded in Gaza in 1987 by imam Sheikh Ahmed Yasin and aide Abdul Aziz al-Rantissi shortly after the start of the first Intifada, or Palestinian uprising against Israel's occupation of the Palestinian territories.
The movement started as an offshoot of the Muslim Brotherhood in Egypt and created a military wing, the Izz al-Din al-Qassam Brigades, to pursue an armed struggle against Israel with the aim of liberating historic Palestine. It also provided social welfare programmes to Palestinian victims of the Israeli occupation.
Hamas defines itself as a "Palestinian Islamic national liberation and resistance movement", using Islam as its frame of reference.
In 2017, Hamas issued a political document effectively claiming to break ties with the Muslim Brotherhood and said it would accept a Palestinian state on the 1967 borders with the return of Palestinian refugees.
Though the move stirred fears among its loyalists that it was giving up on the Palestinian cause, Hamas added the following clause:
"Hamas rejects any alternative to the full and complete liberation of Palestine, from the river to the sea" but considers the establishment of a sovereign Palestinian state on 1967 borders "to be a formula of national consensus".
The movement believes that the "establishment of 'Israel' is entirely illegal". This sets it apart from the PLO, of which it is not a member.
Hamas entered Palestinian politics as a political party in 2005 when it engaged in local elections, and won a landslide victory in parliamentary elections in 2006, beating Fatah.
Since 2007, Israel has launched three wars against Hamas and the Strip. After Hamas won elections in that year, Israel imposed an airtight blockade.
Civilians in Gaza have borne the brunt of the fighting. In the last Israeli assault on the Strip, more than 2,200 Palestinians were killed, including 500 children, over a span of 50 days.
How do their objectives differ?
With the release of Hamas' political document in 2017, the objectives of the two parties are effectively the same - creating a Palestinian state on the borders of 1967.
"There is no value to the clause in which Hamas says it will not give up on historic Palestine," said al-Aqtash, the political analyst. "Hamas has accepted a political compromise and they cannot go back on this."
"All Palestinians dream of liberating historic Palestine, but today, they are working on a realistic solution," he added, explaining they are focusing on "what they can achieve as opposed to what they hope of achieving".
What are their strategies?
The biggest difference between the two movements today is their attitude towards Israel.
While Hamas has clung to using armed resistance, Fatah believes in negotiating with Israel and has completely ruled out using attacks.
The Oslo Accords gave Israel full control of the Palestinian economy as well as civil and security matters in more than 60 percent of the West Bank.
Under the agreements, the PA must coordinate with the Israeli occupation over security and any armed resistance attacks planned against Israelis. This is seen as highly controversial and seen by some as the PA collaborating with the Israeli occupation.
In March, protests erupted in the West Bank when prominent Palestinian political activist Basil al-Araj was killed by Israeli forces in Ramallah, after being arrested by PA security personnel on allegations of planning an attack.
Abbas, the PA president, regularly and publicly condemns any operations of armed resistance carried out by Palestinians against Israelis.
The issue of armed resistance has cast doubt over whether the unity agreement reached this week would succeed.
"The PA does not believe in the legitimacy of Hamas' arms. This means that the PA wants to end the resistance in Gaza and Hamas refuses that. And if Fatah accepts the resistance, Israel will take measures against the PA," Abdulsattar Qassem, a Nablus-based political analyst, told Al Jazeera.
"This will inevitably lead to the destruction of the potential new unity government."
How do they rally support?
Hamas' attraction lies in its ideology, compared with Fatah which has more international backing and is seen as more financially secure.
In terms of garnering support, the two employ very different tactics.
Hamas, like the Muslim Brotherhood, uses grassroots activism to inform people on its ideology, in places such as mosques and universities.
Fatah, on the other hand, no longer carries out such exercises, and relies more on providing financial support to gain followers, according to those on the ground.
Al-Aqtash says about half of Fatah loyalists "financially benefit from the PA and get rewards such as salaries and high positions - along with their families.
"Their livelihood is tied to the existence of the PA."
Many still view Fatah's Arafat as a Palestinian leader. In his time, before signing the Oslo Accords, the party supported armed resistance.
"Many of those on the street who support Fatah do so from an emotional perspective - for the slogans and the history of the movement - without really understanding what the movement's current views are," said al-Aqtash.
On the other hand, Hamas has a completely different loyalty base, says Ramallah-based activist Hazem Abu Helal.
"Hamas has a distinct ideology and they have people working to promote their ideas, as opposed to Fatah which uses money to secure its followers," Abu Helal told Al Jazeera.
"Today, if you ask university students, the majority of them do not know what Fatah's ideology is. The movement does not have clear principles."
Source: Al Jazeera