Hamas traces its roots back to the Muslim Brotherhood, a group set up in Egypt in 1928. The Brotherhood believed that the woes of the Arab world spring from a lack of Islamic devotion. Its slogan: "Islam is the solution. The Quran is our constitution." Its philosophy today underpins modern, and often militantly intolerant, political Islam from Algeria to Indonesia.
After the 1948 establishment of Israel, the Brotherhood recruited a few followers in Palestinian refugee camps in Gaza and elsewhere, but secular activists came to dominate the Palestinian nationalist movement.
At the time, Gaza was ruled by Egypt. The country's then-president, Gamal Abdel Nasser, was a secular nationalist who brutally repressed the Brotherhood. In 1967, Nasser suffered a crushing defeat when Israel triumphed in the six-day war. Israel took control of Gaza and also the West Bank.
"We were all stunned," says Palestinian writer and Hamas supporter Azzam Tamimi. He was at school at the time in Kuwait and says he became close to a classmate named Khaled Mashaal, now Hamas's Damascus-based political chief. "The Arab defeat provided the Brotherhood with a big opportunity," says Mr. Tamimi.
In Gaza, Israel hunted down members of Fatah and other secular PLO factions, but it dropped harsh restrictions imposed on Islamic activists by the territory's previous Egyptian rulers. Fatah, set up in 1964, was the backbone of the PLO, which was responsible for hijackings, bombings and other violence against Israel. Arab states in 1974 declared the PLO the "sole legitimate representative" of the Palestinian people world-wide.
The Muslim Brotherhood, led in Gaza by Sheikh Yassin, was free to spread its message openly. In addition to launching various charity projects, Sheikh Yassin collected money to reprint the writings of Sayyid Qutb, an Egyptian member of the Brotherhood who, before his execution by President Nasser, advocated global jihad. He is now seen as one of the founding ideologues of militant political Islam.
Mr. Cohen, who worked at the time for the Israeli government's religious affairs department in Gaza, says he began to hear disturbing reports in the mid-1970s about Sheikh Yassin from traditional Islamic clerics. He says they warned that the sheikh had no formal Islamic training and was ultimately more interested in politics than faith. "They said, 'Keep away from Yassin. He is a big danger,'" recalls Mr. Cohen.
Instead, Israel's military-led administration in Gaza looked favorably on the paraplegic cleric, who set up a wide network of schools, clinics, a library and kindergartens. Sheikh Yassin formed the Islamist group Mujama al-Islamiya, which was officially recognized by Israel as a charity and then, in 1979, as an association. Israel also endorsed the establishment of the Islamic University of Gaza, which it now regards as a hotbed of militancy. The university was one of the first targets hit by Israeli warplanes in the recent war.
Brig. General Yosef Kastel, Gaza's Israeli governor at the time, is too ill to comment, says his wife. But Brig. Gen. Yitzhak Segev, who took over as governor in Gaza in late 1979, says he had no illusions about Sheikh Yassin's long-term intentions or the perils of political Islam. As Israel's former military attache in Iran, he'd watched Islamic fervor topple the Shah. However, in Gaza, says Mr. Segev, "our main enemy was Fatah," and the cleric "was still 100% peaceful" towards Israel. Former officials say Israel was also at the time wary of being viewed as an enemy of Islam.
Mr. Segev says he had regular contact with Sheikh Yassin, in part to keep an eye on him. He visited his mosque and met the cleric around a dozen times. It was illegal at the time for Israelis to meet anyone from the PLO. Mr. Segev later arranged for the cleric to be taken to Israel for hospital treatment. "We had no problems with him," he says.
Clashes between Islamists and secular nationalists spread to the West Bank and escalated during the early 1980s, convulsing college campuses, particularly Birzeit University, a center of political activism.
As the fighting between rival student factions at Birzeit grew more violent, Brig. Gen. Shalom Harari, then a military intelligence officer in Gaza, says he received a call from Israeli soldiers manning a checkpoint on the road out of Gaza. They had stopped a bus carrying Islamic activists who wanted to join the battle against Fatah at Birzeit. "I said: 'If they want to burn each other let them go,'" recalls Mr. Harari.
A leader of Birzeit's Islamist faction at the time was Mahmoud Musleh, now a pro-Hamas member of a Palestinian legislature elected in 2006. He recalls how usually aggressive Israeli security forces stood back and let conflagration develop. He denies any collusion between his own camp and the Israelis, but says "they hoped we would become an alternative to the PLO."
A year later, in 1984, the Israeli military received a tip-off from Fatah supporters that Sheikh Yassin's Gaza Islamists were collecting arms, according to Israeli officials in Gaza at the time. Israeli troops raided a mosque and found a cache of weapons. Sheikh Yassin was jailed. He told Israeli interrogators the weapons were for use against rival Palestinians, not Israel, according to Mr. Hacham, the military affairs expert who says he spoke frequently with jailed Islamists. The cleric was released after a year and continued to expand Mujama's reach across Gaza.
Around the time of Sheikh Yassin's arrest, Mr. Cohen, the religious affairs official, sent a report to senior Israeli military and civilian officials in Gaza. Describing the cleric as a "diabolical" figure, he warned that Israel's policy towards the Islamists was allowing Mujama to develop into a dangerous force.
"I believe that by continuing to turn away our eyes, our lenient approach to Mujama will in the future harm us. I therefore suggest focusing our efforts on finding ways to break up this monster before this reality jumps in our face," Mr. Cohen wrote.
Mr. Harari, the military intelligence officer, says this and other warnings were ignored. But, he says, the reason for this was neglect, not a desire to fortify the Islamists: "Israel never financed Hamas. Israel never armed Hamas."
Roni Shaked, a former officer of Shin Bet, Israel's internal security service, and author of a book on Hamas, says Sheikh Yassin and his followers had a long-term perspective whose dangers were not understood at the time. "They worked slowly, slowly, step by step according to the Muslim Brotherhood plan."
In 1987, several Palestinians were killed in a traffic accident involving an Israeli driver, triggering a wave of protests that became known as the first Intifada, Mr. Yassin and six other Mujama Islamists launched Hamas, or the Islamic Resistance Movement. Hamas's charter, released a year later, is studded with anti-Semitism and declares "jihad its path and death for the cause of Allah its most sublime belief."
Israeli officials, still focused on Fatah and initially unaware of the Hamas charter, continued to maintain contacts with the Gaza Islamists. Mr. Hacham, the military Arab affairs expert, remembers taking one of Hamas's founders, Mahmoud Zahar, to meet Israel's then defense minister, Yitzhak Rabin, as part of regular consultations between Israeli officials and Palestinians not linked to the PLO. Mr. Zahar, the only Hamas founder known to be alive today, is now the group's senior political leader in Gaza.
In 1989, Hamas carried out its first attack on Israel, abducting and killing two soldiers. Israel arrested Sheikh Yassin and sentenced him to life. It later rounded up more than 400 suspected Hamas activists, including Mr. Zahar, and deported them to southern Lebanon. There, they hooked up with Hezbollah, the Iran-backed A-Team of anti-Israeli militancy.
Many of the deportees later returned to Gaza. Hamas built up its arsenal and escalated its attacks, while all along maintaining the social network that underpinned its support in Gaza.