The recent reports that President-elect Barack Obama is considering opening "low-level talks" with Hamas mark a welcome break with the attitude of the outgoing US administration, and yet they prompt questions about the nature of the Islamist group that has ruled the Gaza Strip since July 2007. How genuine is its commitment to democracy, and how will it respond to diplomatic overtures from America? As the death toll in Gaza rises inexorably, is there any prospect of meaningful negotiations between Israel and Hamas?
These are not easy questions to answer, for Hamas is not a monolithic organisation with a simple agenda - it consists of many different wings and factions, with conflicting aims and philosophies. It was founded in 1987, at the beginning of the first intifada, by the leadership of the Palestinian branch of the Muslim Brotherhood in Gaza, with the aim of directing resistance against the Israeli occupation (the name "Hamas" is an acronym of Harakat al-Muqa wama al-Islamiya - "Islamic Resistance Movement", though it also means "zeal"). The new organisation shared the Muslim Brothers' aim of Islamicising Palestinian society, but it differed from its philosophy in one crucial respect: it reserved the right to commit violence.
"The movement struggles against Israel because it is the aggressing, usurping and oppressing state that day and night hoists the rifle in the face of our sons and daughters," said Sheikh Ahmed Yassin, one of Hamas's founders, who was assassinated by an Israeli helicopter gunship in Gaza in 2004.
In the west, it is known mainly as a terrorist organisation, which is hardly surprising, given that it has been responsible for the deaths of hundreds of Israeli citizens. And yet, in the past 20 years, it has also developed a political wing and maintained a network of schools, clinics and orphanages in the Palestinian territories.
Unlike the notoriously corrupt Palestinian Authority, which is dominated by the late Yasser Arafat's Fatah party, it has acquired a reputation for fairness and keeping its hands clean, which was partly responsible for its victory in the legislative elections of January 2006.
Dr Khaled Hroub, of the Cambridge Arab Media Project, believes that Hamas has long since outgrown the crude anti-Jewish sentiments of its founding charter, which was written by one member of the "Old Guard" of the Muslim Brotherhood in Gaza. He says that we should judge it on the "government platform" delivered by the newly elected prime minister, Ismail Haniyeh, on 27 March 2006. "The entire thrust of the statement is confined directly and indirectly to the parameters of the concept of a two-state solution," he says. "There is no mention or even the slightest hint of the destruction of Israel or the establishment of an Islamic state in Palestine. It reflects very little inclination to radical positions and religious overtones.
"Someone who read this document without knowing that it had been produced by Hamas could justifiably think that it had been written by any other secular Palestinian organisation."
Unfortunately, Hamas never had a chance to implement its programme for government. Neither Israel nor the so-called Quartet on the Middle East - the United States, Russia, the EU and the United Nations - was prepared to recognise a Palestinian Authority run by Hamas, or the Saudi-sponsored government of national unity, which comprised ministers from both Hamas and Fatah. Its first year in office was beset by problems: the international aid that it required to run the government was cut off, and the domestic power struggle erupted into a civil war that left Hamas in control of Gaza while Fatah regained power in the West Bank.
The interplay of factions within Hamas has favoured the rise of armed militias, and given the party control of Gaza’s illegal economy
Dr Claire Spencer, head of the Middle East programme at Chatham House, believes that the rejection of its electoral victory sowed the seeds of the movement's radicalisation, though it might be more accurate to say that it strengthened the radical elements it had always contained. In Gaza in particular, there were leading members of Hamas who had always been opposed to its participation in the elections. Nizar Rayan, the most prominent casualty of the current onslaught on Gaza, who was both a clerical authority and a leading figure in Hamas's military wing, was so opposed to the democratic process that he refused to acknowledge the authority of the new prime minister. When Ismail Haniyeh pledged to put a stop to mortar attacks on Israel, Rayan held a press conference at his mosque in the Jabaliya refugee camp in the northern Gaza Strip, at which he announced that Hamas's military wing, the Izz ad-Din al-Qassam Brigades, was developing rockets capable of reaching the Israeli city of Ashkelon.
Rayan also embodied the most rebarbative elements of Hamas's jihadist tendencies - he was so enamoured of the odious practice of suicide bombing that he sent one of his sons on a mission that resulted in his death, and the deaths of two Jewish settlers in Gaza. He achieved "martyrdom" himself in the assault on Gaza that began on 27 December last year. The International Crisis Group in Jerusalem says that Israel bombed the homes of Hamas's 25 most senior field commanders in the first few days, and yet early this month, its fighters in Gaza were claiming that very few of them had been killed: it seems that all of them had left their houses when the war began, yet Rayan had refused, reportedly insisting "that was the mistake the Palestinians made in 1948". His four wives and at least six of his 14 children are thought to have died with him when the Israeli Air Force bombed his house in Jabaliya on 1 January.
Were Rayan an anomalous reversion to Hamas’s early days, his story would matter less, and yet Matthew Levitt, of the Washington Institute for Near East Policy, says that his kind has come to the fore in the Gaza branch of Hamas in the past six months. In August last year, Gazan extremists affiliated with the group’s military wing dominated the secret ballot for the “shura council”, which directs the group’s various functions to such an extent that the political moderates didn’t stand. The ballot is believed to have resulted in the election of officials such as Ahmed Jabari, the “chief of staff” who used to oversee Hamas’s military wing, creating a group that has no interest in compromise – Levitt believes it regards discussions as just a means of removing it from power and forcing it to compromise on its commitment to confronting Israel through violence.
He concludes that there is nothing to be gained by engaging Hamas in talks, as this will only weaken the anti-Hamas PA and further weaken the prospects of diplomatic progress. Yet others disagree - Claire Spencer points out that no one has ever seriously tried to talk to Hamas, and she believes that, given "politically acceptable terms", its political wing is "sufficiently pragmatic" to engage with the Israeli government. What those terms will be remains unclear. Spencer says that the population of Gaza has become dependent on "the interplay of factions and clan warfare" within the broader Hamas movement, which has favoured the rise of armed militias and given Hamas control of the territory's illegal economy.
"The only way to create any durable settlement for Gaza, and reduce the political stranglehold of the militant wing of Hamas, is to reinstate a functioning official economy," she says. In the short term, when fighting stops, the Israelis will be required to lift the blockade of Gaza and allow its brutalised population to resume a semblance of normal life. But meaningful talks in the long term will also require a change in the Israeli position: "With the requisite US pressure, [Yitzhak] Rabin compromised in 1993, and Obama may choose the same path with whomever wins Israel's February 2009 elections," says Spencer.
After all, it is hardly fair to expect Hamas to live up to international obligations while Israel continues to ignore its own, as Haniyeh pointed out in February 2006. When told that Hamas must recognise Israel, accept all existing agreements made by the Palestine Liberation Organisation and renounce violence, he said that the same conditions should be put to Israel as well. "Let Israel recognise the legitimate rights of the Palestinians first," he told the Washington Post. "Which Israel should we recognise?" he mused. "The Israel of 1917; the Israel of 1936; the Israel of 1948; the Israel of 1956; or the Israel of 1967? Which borders and which Israel?
"Israel has to recognise first the Palestinian state and its borders and then we will know what we are talking about."
Edward Platt is the author of "Leadville" (Picador, £7.99) and a contributing writer of the New Statesman