It originally had a dual purpose of carrying out an armed struggle against Israel - led by its military wing, the Izzedine al-Qassam Brigades - and delivering social welfare programmes.
But since 2005, it has also engaged in the Palestinian political process, becoming the first Islamist group in the Arab world to gain power democratically (before forcibly taking control of its stronghold of Gaza).
Hamas is designated a terrorist organisation by Israel, the US, EU, Canada and Japan due to its long record of attacks and its refusal to renounce violence. Under the group's charter, Hamas is committed to the destruction of Israel.
But to its supporters it is seen as a legitimate resistance movement.
In 2006, Hamas won a stunning victory in the Palestinian Legislative Council (PLC) elections, but tensions with the rival Fatah faction of Palestinian Authority President Mahmoud Abbas heightened.
Deadly clashes between Fatah and Hamas erupted in Gaza in June 2007, after which Hamas set up a rival government, leaving Fatah and the PA running parts of the West Bank not under Israeli control.