On 7 October, the Palestinian group , in one of the most serious escalations of the Israel-Palestinian conflict in years.
The attack resulted in the deaths of 1,197 people, mostly civilians, according to official Israeli figures. Militants also seized 251 hostages, 111 of whom are still held captive in Gaza, including 39 the military says are dead.
Israel's retaliatory military campaign in Gaza has killed at least 39,400 people, according to Gaza's health ministry.
Hamas' chief political leader Ismail Haniyeh , the group said in a statement.
However, its military chief Yahya Sinwar, seen by Israel as the mastermind behind the 7 October attack, is in hiding. Only two or three people know the whereabouts of Sinwar, London-based Arabic newspaper Asharq Al-Awsat reported.
So how does Hamas actually work in terms of its military and political activities?
A brief history of Hamas, its founding and ideology
Hamas, or the Islamic Resistance Movement, was founded in 1987 during the first Palestinian Intifada, or uprising. It is backed by Iran and shares the Islamist ideology of the Muslim Brotherhood, which was established in Egypt in the 1920s.
It has run the Gaza Strip since 2007, after a brief civil war with forces loyal to the Fatah movement led by President Mahmoud Abbas, who is based in the West Bank and also heads the Palestine Liberation Organization (PLO).
The Hamas takeover of Gaza followed its win in Palestinian parliamentary elections in 2006 — the last time they were held. Hamas accused Abbas of conspiring against it. Abbas described what happened as a coup.
Hamas refuses to recognise the state of Israel and violently opposed the Oslo peace accords negotiated by Israel and the PLO in the mid-1990s.
Hamas has an armed wing called the Izz al-Din al-Qassam Brigades, which has sent gunmen and suicide bombers into Israel. Hamas characterises its armed activities as resistance against Israeli occupation.
Its 1988 founding charter called for the destruction of Israel, although Hamas leaders have at times offered a long-term truce, or hudna in Arabic, with Israel in return for a viable Palestinian state on all Palestinian territory occupied by Israel in the 1967 war. Israel regards this as a ruse.
Hamas opened its political office in Qatar's capital Doha in 2012 and several Hamas officials including Haniyeh used to spend time in Doha.
Hamas's compartmentalised power structure meant political leaders abroad were likely aware of some plans of the 7 October attack, but not of specific details or tactics.
Israel, unable or unwilling to operate against Haniyeh in Qatar, vowed to go after Sinwar.
Hamas' twin political and military structure
Hamas has projected a united front since its war with Israel, but experts say divisions within the Palestinian movement have weighed on efforts towards a ceasefire.
Before his death, the head of Hamas' political bureau Haniyeh was in self-exile in Doha and was talking openly with Qatari authorities and mediators.
Meanwhile, the group's leader in the Gaza Strip, Sinwar, is in hiding after Israel vowed to pursue the presumed brains behind the October attack to the death.
The top Gaza leader is absent from truce talks, but mediators have to take both his and Haniyeh's positions — as well as Israel's — into account.
A Palestinian militant from the al-Qassam Brigades, the military wing of Hamas. Source: AP / Adel Hana/AP
A source close to the mediation efforts, led by Qatar, Egypt and the United States, told Agence France-Presse news agency that every proposal sent to Hamas's political bureau had to be communicated to officials inside Gaza.
And "any change means communication back and forth", said the source, requesting anonymity due to the sensitivity of the issue.
Eva Koulouriotis, an independent Middle East analyst, told AFP in February that Hamas's "loudest voice" Sinwar had sidelined political chief Haniyeh.
According to the US military's CTC Sentinel journal, "the Gaza-based leadership has become the most prominent given its control of the territory" which presents it with financial and military advantages".
Differences of opinion between the political and military wing are expected to put the group to the test: who has the final word, can they maintain a display of unity, and will Gaza's future be decided at the negotiation table — or on the battlefield?
Hamas, in its entirety, is designated as a terrorist organisation by countries including Australia, Israel, Canada, the UK and the US.
Some countries list only its military wing as a terrorist group.
The UN has not condemned Hamas in its entirety as a terrorist organisation, due to insufficient support from member states to do so during a 2018 vote.