The conventional wisdom has it that Palestinians chose Hamas despite its Islamist platform. Conversations with voters in the West Bank, however, reveal that many chose Hamas because of it.

AROUB REFUGEE CAMP, West Bank --Here at the grass roots of Palestinian society, the imam of the local mosque is unequivocal about the root of Hamas's appeal: strict, unyielding Islamic faith.

Nizar Aweidat, 27, doesn't look the part of a typical cleric, wearing the frayed, plaid, buttoned-down shirt favored by secular Palestinians and a faint strip of peach fuzz on his upper lip instead of a beard. But Aweidat has shepherded a surge of support for Hamas in this tiny refugee camp that once unanimously supported the secular Fatah faction.

Fatah suffered a stunning defeat in the Jan. 25 Palestinian legislative elections, in part because of the success men like Aweidat have had in luring voters to Hamas. How Aweidat lured those voters is instructive: He attracted supporters not through the web of social services typically cited as the source of Hamas's appeal, or with talk of the extravagances of Fatah, but through religion.

''Fatah doesn't tell people to pray. This contradicts the Koranic verses which say that my prayer, my devotion, my life, and my death are for God," Aweidat explained. ''Life should be colored by Islam. Hamas has a comprehensive theory of society and life, dealing with everything through its vision of Islam."

The conventional wisdom says it's the other way around, that Palestinians turned to Hamas because they were fed up with corruption and instability, or disappointed with the peace process-and that they embraced Hamas despite the party's Islamist platform. Virtually everyone following the Palestinian election-Palestinian academics, politicians allied with Fatah, and even the Israeli military and Western diplomats-bought into this wisdom. The prediction was that Hamas would capture at best a third of the seats in the Palestinian legislature.

How is it that these analysts all made the same mistake? Part of the explanation lies in the tendency of the largely secular Palestinian elite to underestimate the strength of Islamism. Influential Palestinian analysts predicted that Hamas could never win a majority, because its extremist religious views-and its commitment to unending war with Israel-would not resonate with the Palestinian public.

Khalil Shikaki, the Palestinian pollster considered the most reliable monitor of public opinion in Gaza and the West Bank, was caught off guard by the election results. After more than a decade of public opinion research, Shikaki still believes that liberal democracy has strong support among Palestinians, and says that Hamas ''will find resistance from the public if they try to impose their social agenda," which is based on a strict adherence to the Koran and would, among other things, ban alcohol and curtail the rights of Palestinian women. But even Shikaki admitted this week that when it came to the election, ''we got it completely wrong."

. . .

In small places like Aroub refugee camp and in large cities like Nablus and Gaza City, Hamas makes its first mark on communities by organizing Koran classes, drawing its core membership from those who respond to the call to practice a more active Islam.

Growing up in the Aroub camp, Aweidat said, he and his parents rarely attended prayers, except on Fridays. In three years as the camp's imam, Aweidat has watched turnout at the daily prayers swell from 30 people to 150.

Aweidat first encountered ''the Islamic awakening" at a Hamas tutorial in the camp. He devoured pamphlets and writings about Islam and eventually left to obtain a degree in Islamic studies from Al-Najah University in Nablus. He returned to the cluster of two-story concrete apartment blocks, nestled at the foot of the Hebron hills and home to 10,000 people, to bring people ''closer to God."

''Hamas's role is to spread Islamic education," Aweidat said. The other popular planks in the Hamas platform, like helping the poor and fighting corruption, are secondary byproducts of the religious agenda, he said.

Interviews in the West Bank and Gaza over the past six months seem to bear out Aweidat's claims. Most Hamas voters described themselves as committed, religious Muslims who supported Hamas first because of its religious credentials and then because of its promises to provide more services and curtail corruption.

''God willing, we will have an Islamic republic here," said Hussein Ibrahim Hussein, 39, a fruit dealer in Nablus. Hussein said he doesn't consider himself an Islamist, nor is he officially a member of Hamas. But he voted for Hamas because he thinks the faction will behave responsibly-ruling wisely and distributing resources fairly-due to its adherence to Islamic doctrine.

All over the Palestinian territories, Islam has been on the upswing. Over the past decade, as Hamas has become the indisputable power in Gaza, the city's famed nightclubs have disappeared. This past New Year's Eve, militants burned down the UN Club, the last place in Gaza that served alcohol. The majority of women, even secular women, now wear the hijab, or head scarf, a comparatively rare sight two decades ago.

Palestinian women still pride themselves on playing a more central role in political life than women in other Arab countries, and indeed Hamas fielded more than a dozen women candidates. But even the presence of these women in the Hamas ranks might be as much an indication of Islam's widening appeal as a sign of nascent liberalism. The women who ran under the Hamas banner included not just the traditional widows of ''martyrs," but also professional women with careers as teachers, professors, and pharmacists-a sign that Hamas's influence extends throughout all sectors of Palestinian society. Increasingly, Hamas's leading activists are lawyers, businesspeople, and academics, as evinced by their slate packed with white-collar candidates, and by the audiences seen at daily and Friday prayers in Hamas mosques.

In cities where urban professionals predominate, Hamas did especially well, even winning most of the seats in East Jerusalem. Their candidates included a host of doctors, lawyers, and engineers, who steadfastly presented themselves as ''new Islamists"-not rural imams with beards, but clean-cut technocrats also committed to their religious faith.

. . .

Hamas's victory comes as Islamic movements are gathering momentum across the region, dominating opposition politics in Egypt and Jordan and gaining ground among traditionally secular Kurdish and Sunni Arab communities in Iraq.

''In the whole region, people are becoming more religious," said Ali Jarbawi, a political scientist at Birzeit University outside Ramallah. He was more bullish about Hamas's prospects than most of his colleagues, but he never expected the faction to win as many votes as it did. ''Everybody was wrong," he said.

In part, that might be because outsiders looking for insight into Palestinian politics regularly turn to a pair of Palestinian pollsters-Shikaki and the head of the Palestinian Center for Public Opinion, Nabil Kukali-and the English-speaking political science professors at Birzeit and Al-Quds University in Jerusalem. These scholars work closely with foreign academics (and indeed many were trained in the West) and frequently confer with Israeli colleagues and international NGOs. Perhaps because of the cosmopolitan, secular milieu in which they operate, many of them have underplayed the emergence in the last decade of a potent strain of Islamism growing in popularity among the public they study.

Shikaki still interprets the vote as a backlash against Fatah, not a wave of support for Hamas. ''I think most people don't expect Hamas to create an Islamic state," Shikaki said. Most observers don't seem to expect that, and to be sure, secularism still runs strong in Palestinian society. Even among Islamists there is debate about how Islamic Palestine should be. Then again, Shikaki and those who rely on his information didn't expect Hamas to win a landslide victory.

Thanassis Cambanis is co-chief of the Globe's Middle East bureau.