A death in the family opened a doorway back to Islam for Imtiaz Baksh, a tall, turbaned Canadian with a prominent beard and quiet voice. Although raised as a Muslim by parents of Indo-Pakistani origin, he'd never been much of a practicing one himself until his mother passed away.
"Emptiness appears in the heart," he recalls, sitting on a carpet at a madrassah in Karachi. "In that way you can be born again."
More than 10 years ago, Mr. Baksh, his wife, and son began a journey that led them from the quiet of Alberta to the crushes of Karachi. They had opted to study Islam at the Jamia Binoria, a prominent madrassah or Islamic school, where they have remained since 2000.
Under pressure from Western governments, Pakistan has banned foreigners like Baksh from madrassahs after it was discovered that one of the London bombers had visited a Pakistani madrassah. No official deadline has yet been set for the return of foreign students, although the government claims 65 percent have already left.
Many of those who remain are Westernized Muslims who are pursuing a madrassah education as a supplement to - not a substitute for - other types of modern education. Indeed, many come with long experience in Western classrooms, and could form a bridge between Western and Islamic worldviews and systems of thought.
Jamia Binoria, founded in 1954, is one of the largest madrassahs in Pakistan, a sprawling complex where 5,000 students, including some 200 foreign students from 32 countries, squeeze into tiny rooms. The atmosphere is somber despite the tight spaces, and the students sway as they intone methodically over the Koran.
Like many Western students here, Imtiaz Baksh considers returning to the West with the evangelical mission of spreading the teachings of Islam, perhaps by opening a school in Canada. His son, 19-year-old Ejaz Ullah, intends to follow suit.
"Living there [in Canada] opened my eyes to how the world operates, how young people develop themselves. Living in a democratic country gave me an understanding of freedom of speech. A person had rights; you can say what you wanted to say and not be afraid of being taken away by the secret police, for example," says Baksh.
The Bakshs are one of many students at madrassahs who, in their education and upbringing, embody a melding of Western values and traditional Islamic teaching.
Saeed-ur-Rahman, who was born in England to Pakistani parents, is, he believes, a corrective to a popular misconception about madrassahs.
"It's a misconception that students [at madrassahs] are downtrodden, poor, dead-enders," he says over rounds of tea at the Jamia Uloom Islamia madrassah in Binnori Town, Karachi. "We studied [in the West], in school, in college."
A recent study by The World Bank bolsters this view, pointing out that "[t]here is weak evidence to support the hypothesis that poorer and less-educated families are more likely to send a child to a madrassah." The report also says that 75 percent of all households with a child in a madrassah also send a child to a private or public school, challenging the notion that madrassahs are the province of radicalized families.
Mr. Rahman's decision to study here makes perfect sense in his worldview. "If somebody wants to study engineering, they go to the West. We have come to these centers where the standard of Islamic education is higher," he explains in British-accented English.
Madrassahs are widely criticized for providing what is considered a paltry modern education. Like many madrassahs, Rahman's does in fact provide several years of English, science, social studies, and mathematics. But many within the system point out that, in the hundreds of years that madrassahs have existed, modern education has never been the point.
"Material seeking and getting a job are not our purpose," says Mulana Saif-ullah Raddani, editor of the madrassah's weekly newspaper. "The only purpose of our education is to understand God's commandments."
He adds that his own son is studying at the madrassah while pursuing a BA degree in computers at a private college. Some of the foreign students have come to Pakistan to gain a similar mix of madrassah and modern learning, sent by their parents to learn Islamic teachings before returning to schools in the West.
There are those who do not welcome the presence of foreign students, finding it suspicious at best and potentially dangerous at worst.
"This is a most dangerous kind of person," contends S.H.M. Jafri, a professor of Islamic studies at the Aga Khan University in Karachi. "Madrassahs give specialization in a certain type of Islam" which adds to sectarianism, he says.
Mr. Jafri finds the decision to study at madrassahs questionable given the option of studying at universities in the West. "They could have gone to a department of Islamic studies at a university in America, or at the American University in Cairo. Why have they chosen a madrassah?" he says.
Rahman believes the answer lies in taking the best from both worlds. "We take the good that the West has to offer, and then we come here and take away from this country the good, and leave with a better frame of mind," he explains.
Rahman and others say there is no over-riding conflict between their religious values and the values of the societies to which they will return.
"I don't disagree with the system. I disagree with the people who abuse the system," Baksh says. "I have a negative opinion of drug lords and pimp lords."
But there are limits to how, as Muslims, they can enjoy the social freedoms of Canada and England.
"If you call open-mindedness the freedom to do what you want freely, to sleep around wherever you want - Islam does not allow that. There is a limit to everyone's freedom," Saeed-ur-Rahman says, adding, "I think anyone can live anywhere in the world and mix with anyone in the world if he's a good citizen, and that's what Islam teaches you, to be loyal to your country, to your community."
• Rashad Bukhari contributed reporting for this article.