Founded by just seven people in Gaza, Hamas now has political and military leaders spread across the Arab world, complicating its ability to send a unified message for negotiating an end to a seven-week war with Israel.
In less than 30 years, what was a grassroots Islamic group has expanded well beyond the confines of Gaza, a narrow coastal enclave hemmed in by Israel and Egypt.
- Hamas is not a terror organization, but a state in the making
- Hamas lying in wait
- 'Bear hug' for Hamas
But the Islamist movement's diffuse structure and complex lines of communication have created confusion over whether it is responsible for staging some attacks on Israeli targets or not.
Illustrating this confusion, Hamas's leader in the West Bank - who lives in exile in Turkey - claimed responsibility last week for the killing of three Jewish seminary students in June, an attack that led indirectly to the current conflict.
His claim was initially played down by others in Hamas, which had denied any involvement, before Hamas's overall leader, Khaled Meshal, accepted that it had carried out the killings.
"We were not aware of this action taken by this group of Hamas members in advance," Meshal, who lives in exile in Qatar, told Yahoo News, appearing reluctant to put any blame on the West Bank leadership for failing to notify him earlier.
"But we understand people are frustrated under the occupation and the oppression, and they take all kinds of actions," he said. "Hamas's political leadership was not aware of all these details. We learned about it later on."
Similar gaps in the movement's position have emerged at other times, delaying the negotiations on ending the conflict in which more than 2,000 Palestinians have been killed, most of them civilians. On the Israeli side, 64 soldiers and six civilians have been killed, two of which just as the ceasefire came into effect Tuesday evening..
Such a problem arose after Egyptian mediators, negotiating indirectly with Israel and the Palestinians in Cairo, struck a five-day ceasefire earlier this month.
Hamas negotiators then headed in different directions to consult on the way forward. Some went to Qatar to see Meshaal, others stayed in Cairo where the movement's number two, Moussa Abu Marzouk, is based, and still others were due to return to Gaza.
Then, with positive noises emerging about the possibility of an agreement, a spokesman for Hamas's military wing dismissed the talks entirely. "The Palestinian delegation should leave Cairo immediately and not return," declared Abu Ubaida, the spokesman for the Izz el-Deen al-Qassam Brigades. "Any move (towards a truce deal) will not be binding on us at all."
Beverley Milton-Edwards, a professor of politics and international studies at Queen's University in Belfast and a specialist on Hamas, has written about the difficulty of pinning the movement down in its positions.
"Hamas has a record of engaging in spoiler violence in order to have a negative impact on peace implementation," she said, referring to earlier efforts to achieve peace with Israel.
Hamas, which stands for "Harakat al-Muqawama al-Islamiya" or the Islamic Resistance Movement, was founded by Sheikh Ahmed Yassin and six colleagues in December 1987.
Initially an offshoot of Egypt's Muslim Brotherhood, it quickly gained popularity during the first Palestinian "intifada", or uprising, against Israel. Its charter, published in 1988, calls for the destruction of Israel and the creation of an Islamic society in the whole of historic Palestine.
Hamas's spread beyond Gaza, occupied by Israel from 1967 until 2005, was mostly a desire to unite with the Palestinian statehood cause in the occupied West Bank, but also partly due to Israel's efforts to eradicate the movement.
After Yassin was assassinated in Gaza by an Israeli air strike in 2004 and his successor, Abdel-Aziz al-Rantissi, was also killed the same year, the baton passed to Meshaal, a political figure by then living in exile in Syria.
Meshal, who survived an Israeli assassination attempt in the Jordanian capital Amman in 1997, fell out with Syria after Hamas criticized President Bashar Assad's crackdown on Sunni Muslim opponents in the civil war, and moved to Qatar in 2012.
While he is recognized as the clear authority at the top of Hamas and the movement is disciplined, his inability to visit Gaza or the West Bank - he has been in exile for 37 years - means he is at times a distant figure, one with a political rather than a military background.
With Hamas having fought four conflicts with Israel since 2006, the military wing has gained popularity among young Palestinian men who have flocked to join its ranks. has become almost a legendary figure, his reputation enhanced by seldom appearing in public.
So popular is Deif, whose wife and children were killed in an Israeli airstrike last week, that some Hamas watchers regard him as more powerful than Ismael Haniyeh, the former prime minister in Gaza and another Hamas leader.
The architect of the latest war, Deif is said to have no political ambitions, but his influence stretches beyond his official role and some analysts believe the military branch is eclipsing the political branch in some respects.
As a result, the declaration by Abu Ubaida, the military wing's spokesman, that the Cairo talks were pointless marked a serious challenge to the negotiations, exasperating Egypt.
"It can be regarded as a toppling of the political leadership of Hamas, not in the meaning of a coup but in terms of decision-making," said Hassan Asfour, a former Palestinian peace negotiator.
Since then, renewed efforts suceeded in bringing Hamas and the other Palestinian factions, including Fatah, Islamic Jihad and the Popular Front for the Liberation of Palestine, back to negotiations with the Israelis, and eventually reaching a deal.
Meshal, directing affairs from Doha where he draws financial support from the Emir of Qatar, has tried to send the right signals. He met Palestinian Authority President Mahmoud Abbas last week and sought to present a united front.
It seems no small feat the political and military wings as well as leaders in Gaza, the West Bank, Cairo, Istanbul or elsewhere backed Tuesday's deal.
"No one decides alone in Hamas, there is a vote and the majority rules," said Hamza Abu Shanab, a Gaza analyst and an expert on Islamist factions. "The group may have begun small and in a tiny place... but the (ultimate) decision remains that of the executive office."