The high-point in Hamas's fortunes came with their January 2006 election victory
Hamas takes its name from the Arabic initials for the Islamic Resistance Movement.
Designated a terrorist organisation by Israel, the US and the EU, it is seen by its supporters as a legitimate fighting force defending Palestinians from a brutal military occupation.
It is the largest Palestinian militant Islamist organisation, formed in 1987 at the beginning of the first intifada, or Palestinian uprising against Israel's occupation in the West Bank and Gaza.
The group's short-term aim has been to drive Israeli forces from the occupied territories. To achieve this it has launched attacks on Israeli troops and settlers in the Palestinian territories and against civilians in Israel.
It also has a long-term aim of establishing an Islamic state on the West Bank, Gaza and Israel.
The founding document of Hamas commits the organisation to the destruction of Israel.
For years the organisation was divided into two main spheres of operation:
social programmes like building schools, hospitals and religious institutions
militant operations carried out by Hamas' underground Izz al-Din Qassam Brigades.
But it became increasingly involved in Palestinian factional politics, both in the occupied territories and with a political branch in exile.
One of its leaders-in-exile, Khalid Meshaal, was the target of a bungled Israeli assassination attempt in Jordan in 1997.
King Hussein was outraged by Israel's action and was only placated when Prime Minister Binyamin Netanyahu released Hamas's jailed spiritual leader and founder Sheikh Ahmed Yassin.
While King Hussein tolerated Hamas's presence, his successor King Abdullah II had the group's headquarters closed down and senior figures expelled to Qatar.
Hamas has remained outside the main Palestinian political structure of the PLO, but it took part in - and won - Palestinian Authority (PA) legislative elections in the occupied territories in 2006.
Hamas came to prominence after the first intifada as the main Palestinian opponent of the Oslo accords - the US-sponsored peace process that oversaw the gradual and partial removal of Israel's occupation in return for Palestinian guarantees to protect Israeli security.
Despite numerous Israeli operations against it and clampdowns by Yasser Arafat's Palestinian National Authority, Hamas found it had an effective power of veto over the process by launching suicide attacks.
In February and March 1996, it carried out several suicide bus bombings, killing nearly 60 Israelis, in retaliation for the assassination in December 1995 of Hamas bomb maker Yahya Ayyash.
The bombings were widely blamed for turning Israelis off the peace process and bringing about the election of right-winger Mr Netanyahu who was a staunch opponent of the Oslo accords.
In the post-Oslo world, most particularly following the failure of US President Bill Clinton's Camp David summit in the summer of 2000 and the second intifada which followed shortly thereafter, Hamas gained power and influence as Israel steadily destroyed the infrastructure of the Palestinian Authority.
In towns and refugee camps besieged by the Israeli army, Hamas organised clinics and schools which served Palestinians who felt entirely let down by the corrupt and inefficient Palestinian Authority dominated by its secularist rival, Fatah.
The armed struggle
Many Palestinians cheered the wave of Hamas suicide attacks (and those of fellow militants Islamic Jihad and the secular al-Aqsa Martyrs Brigade) in the first years of the intifada.
They saw "martyrdom" operations as the best way to avenge their own losses and counter Israel's unchecked settlement building in the West Bank.
After the death of Fatah leader Yasser Arafat in 2004, the Palestinian Authority was taken over by Mahmoud Abbas, a vocal opponent of attacks on Israel.
He viewed Hamas rocket fire, the militants' weapon of choice in recent years, as counterproductive, inflicting little damage on Israel but provoking a harsh response by the Israeli military.
When Hamas scored a landslide victory in the Palestinian Authority legislative elections in 2006, the stage was set for a bitter power struggle with Fatah.
Hamas resisted all efforts to get it to sign up to previous agreements with Israel, as well as to recognise Israel's legitimacy and to give up the armed struggle.
It has remained steadfast to its pledge never to sign up to a permanent ceasefire while Israel occupies Palestinian territory and its troops are responsible for the deaths of Palestinians.
It did, however, offer a 10-year truce in return for a complete Israeli withdrawal from territories occupied in 1967: the West Bank, Gaza Strip and East Jerusalem.
But it has not relinquished its assertion that Palestinian refugees from 1948 should be allowed to return to homes in what has become Israel - a move that threatens Israel's very existence as a Jewish state.
Over the years Hamas has lost many members in Israeli assassinations and security sweeps.
The paraplegic and visually impaired Sheikh Yassin was killed in a missile attack on 22 March 2004.
Israel has paid a price for Hamas' opposition to the peace process
Khaled Meshaal, now based in Syria, became the group's overall leader. Abdul Aziz al-Rantissi emerged as Hamas leader in Gaza before he too was assassinated six weeks later on 17 April.
Other prominent Hamas officials killed by the Israelis include Ismail Abu Shanab, in August 2003, and Izz al-Din Qassam Brigades leader Salah Shehada, in July 2002.
Shehada's successor, Muhammad Deif - whom Israel blames for the 1996 bombings - has escaped several attempts on his life.
More moderate political figures also emerged as significant players within the movement.
One of them was Ismail Haniya, a former aide to Sheikh Yassin, who was appointed to a "collective leadership" in the occupied territories along with the more hardline Mahmoud Zahhar and Said al-Siyam.
Facing the electorate
Hamas's decision to stand in PA legislative council elections in 2006 was a major departure for the movement and had a profound impact on the Israeli-Palestinian conflict.
Election campaigns were a new departure for Hamas leaders
Top figures said the move reflected Hamas's importance in the Palestinian sphere and the need for it to address failing political structures beset by corruption, inefficiency and lost credibility.
It did not, they insisted, imply any acceptance of a two-state solution to the conflict, although Hamas opposition to the Oslo accords had kept it out of previous elections.
Aside from its much-vaunted incorruptibility, Hamas campaigned forcefully on its claim that Israel's withdrawal from Gaza in the summer of 2005 was a victory for its commitment to armed conflict with the Israelis.
But if Hamas leaders thought its parliamentary victory would bestow greater credibility on them in the eyes of the international community - or if they thought in any way that they would be given any more leeway - they were mistaken.
The new government was subjected to tough economic and diplomatic sanctions by Israel and its allies in the West.
Skirmishes in Gaza with the Fatah-dominated PA security forces escalated to all-out war, in which the well-armed and better-disciplined Qassam Brigades eventually ousted their rivals in May 2007.
Hamas security control made Gaza a more calm and orderly place than it had been for months. But Israel tightened its blockade on the Strip and - despite a multilateral ceasefire in June 2008 - rocket fire and Israeli raids continued to provide provocations for more violence by each side.
And on the diplomatic level, the Palestinians faced their biggest set-back for decades.
With Hamas in charge of Gaza and the pro-Fatah PA operating in the West Bank - and neither side engaging properly with the other - the aspiration of an independent Palestinian seemed further away than ever.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.