By Christopher Landau
BBC Religious Affairs correspondent, Cairo
The role that women play in mosques varies substantially around the Muslim world. Visits to two mosques in the Egyptian capital, Cairo, show just how different women's experiences can be.
The al-Seddeeq mosque, in a prosperous suburb of Cairo, stands in front of a park - unusual enough in an overcrowded city lacking much green space.
The large mosque, built in the last 20 years, forms an impressive focal point in the local community.
But it also represents one potential vision of the future for Egypt's mosques - where women are heavily involved in increasing aspects of the mosque's activities.
As I step inside, I hear sounds I had not been expecting - the raucous shouts of children playing.
About 250 young boys are surrounded by paint, glue, paper and old egg boxes - making artwork from recycled materials.
Earlier in the day, they had been learning to recite the Koran, but by late afternoon it was time for a more hands-on task.
There is nothing unusual about mosques offering educational programmes. But at al-Seddeeq mosque, all of the educational work is run by women.
A new role
On the day I visit, 35 female volunteers are involved - and 2,000 local children are on a waiting list to join the programmes.
Maha al-Mahy runs the mosque's work with children as well as educational programmes for women.
She is clear that women's role in the mosque will continue to develop, just as opportunities for women within Egyptian society also open up.
"Other things will be changed. Maybe we are going to have more work, more roles, in future," she tells me.
Would that mean, I asked her, that women might even fulfil some of the roles still only undertaken by men?
"Why not?" she answers. "Men are good - but also I think women can do what men do. Some roles, it's better for women than men."
But you do not have to travel far to find very different attitudes to women's involvement.
In a poorer part of Cairo, I am driven through crowded streets past several mosques.
Some of those we pass do not have any facilities for women to pray, let alone be involved in other activities.
But at one mosque, we meet Sabriah Ibrahim. She is the only woman involved with leadership - and in this poorer area, no local women are wealthy enough to be able to volunteer.
The mosque could hardly be more different from the gleaming marble structure of al-Seddeeq, in the more prosperous part of town.
Hemmed in by other buildings, it is a cramped building on a small site, with the men's prayer hall as the main focus.
There is one small office, which doubles up as an administrative base and the place from which clothing is distributed to those in need. But there is not the capacity to offer programmes like those that the al-Seddeeq mosque is able to offer to the hundreds of children in the area.
Women in prosperous areas have more time for mosque activities
But perhaps the most striking contrast is in the role that women play in the life of the mosque.
"Most of the week, women don't come for prayer, they only come for the Friday prayer, or when there are lessons or certain activities," Sabriah Ibrahim says.
"But other than this, very few women come to the mosque, and most of them are older women."
The disparity between the two mosques I visited is striking.
In one, women play an active role and dream even of running those activities still the preserve of men - perhaps, one day, even leading prayers.
In the other, one sole woman tries to run women's activities, but in an area where there is little tradition of women being involved in their local mosque.
Some of the factors seem to be financial: Al-Seddeeq's volunteers are women who are wealthy enough to be able to choose to spend time at the mosque rather than needing to work; in the crowded streets of Old Cairo, few women have such an opportunity.
Later, I meet Dr Mohammed Abulaila, recently retired as head of Islamic Studies at Cairo's al-Azhar University.
There is no discrimination in Islam. Men are required to pray five times a day, and women as well
Dr Mohammed Abulaila
He too believes that economic factors play a role in whether women attend mosques - put simply, poorer women are more likely to have to stay at home with their families.
But he stresses that Islam itself makes no distinction between men and women, when it comes to the importance of attending the mosque.
"Women, like men, are commanded to go the mosque," he tells me.
"There is no discrimination in Islam. Men are required to pray five times a day, and women as well."
The gap between Dr Abulaila's words and the reality for many women in Cairo is clear.
But religion is just one part of life where opportunities for women are changing dramatically.
In the city's mosques, that opening up of opportunity is happening at startlingly different rates.
Islam, like many other religions, is beginning to face questions about how long centuries of male dominance will continue.