When Egypt's government banned Islamic veils and all-encompassing robes in the dorms of public universities, it cited reports of men wearing the garb to sneak into the women's quarters.

But there was a deeper reason behind the move: an intensifying struggle between the moderate Islam championed by the state and a populace that is turning to a stricter version of the faith, whose most visible hallmark is the niqab _ the dress that covers the entire female form.

The debate has grown more heated since Mohammad Tantawi, the top cleric at prestigious Al-Azhar University, banned the niqab in classrooms and dorms on the grounds that it "has nothing to do with Islam," and that it was unnecessary since the college is gender-segregated. Meanwhile, the Health Ministry and religious authorities forbade nurses and preachers to wear the niqab.

The moves have angered many women who say they cover up voluntarily out of religious conviction, and in some cases are penalized for it.

Fatma al-Assal, 22, has just earned her veterinary degree and says she has already been refused a teaching job. But she refuses to back down.

"Al-Azhar has no authority over me," she said.

Like her mother and two younger sisters, she covers everything including her hands. Dressed that way, "I feel respect. I don't have anyone looking at me," she said. "Islam says all the woman's body is a temptation."

She said she takes her example from what many Muslims believe was the dress code in the time of Muhammad, who founded their religion nearly 1,400 years ago. "I want to emulate the wives of the prophet."

In European countries, particularly France, the debate over women's dress has turned on questions of how to integrate immigrants and balance a minority's rights with secular opinion that the garb is an affront to women.

But in Egypt, the dynamic is different. Here, public conservatism is at odds with a government that is viewed not only as secular but as autocratic, corrupt and uncaring.

The debate underscores the gulf between the more secular elite that wields economic and political power, and the largely impoverished and disenfranchised masses who increasingly find solace in religion.

The split was evident last month when billboards of a swimsuited Beyonce were plastered all over Cairo to advertise the American singer's concert at Egypt's most exclusive beach resort _ a concert the vast majority of Egyptians couldn't afford to attend.

One conservative lawmaker branded it an "insolent sex party." Another called for banning the "nudity concert," and an anti-concert petition on Facebook gathered 10,000 supporters. The concert went ahead without incident in the remote resort under heavy security protection.