A slumping world property market has given new impetus to Morocco's plans to demolish its townships, where decades of state neglect have bred despair and religious extremism.

As demand for luxury homes and tourist facilities falls in the wake of the global financial crisis, Morocco's property firms are making the most of a state-backed scheme to rehouse 4 million slum dwellers in new flats.

Developers are offered cut-price land if they sell some floors of their apartment blocks to slum families below the market price. The families receive grants to help them pay.

Thirty towns had been cleared of slum areas since 2004 and 50 000 shacks were destroyed last year, Housing Minister Taoufiq Hejira said in January. He was aiming for similar numbers this year.

Zahidi Elarbi, a member of a voluntary development association in the Casablanca suburb of Sidi Moumen, said half the residents of its most notorious slums - Thoma and Douar Esquila - had been rehoused.

"Sidi Moumen has completely changed, although there is still a severe lack of services," said Zahidi. Poverty and joblessness were still a serious problem, he said, "but better to be idle in a new apartment than a slum".

King Mohammed has announced the construction of 130 000 social housing units worth $1.83 billion (R16 billion) by 2012, and several firms, including Morocco's top property developer, Addoha, are focusing on low-income housing.

The country's biggest building materials manufacturer, Lafarge Ciments, said demand for its cement was likely to grow this year thanks to the social housing projects.

The scheme was launched after 14 young men from the slums set off bombs in the centre of Casablanca in May 2003, killing 45 people, including themselves. It was a shock for a country proud of its social stability and showed the growing influence of radical Islamic preachers in neighbourhoods abandoned by the state.

Most of the bombers were from Sidi Moumen, home to thousands of breeze-block shacks with metal roofs held down by rocks. Barefoot children hop between stagnant puddles in narrow alleyways, past sheep and cows picking over piles of rubbish.

Young men feed and clothe their families by shining shoes or selling offal, fruit and herbs from carts and recycling scrap metal. Winter floods send rats scurrying through living rooms and in summer the sun turns homes into ovens.

Several unofficial mosques opened in Sidi Moumen in the 1990s, some with radical imams who organised vigilante squads to patrol the slums and punish crime and immoral behaviour.

The mosques were shut or demolished after the 2003 attacks, when the state tightened control over religious preaching. More radicalised youths from Sidi Moumen blew themselves up in 2007, killing a police officer, and for many Moroccans Sidi Moumen is still a byword for extremism.

"When a bus passes by with Sidi Moumen marked as its destination, passers-by sometimes shout 'Boom!'," said former resident Saida Fikri.

Young men from the slums say the police avoid their neighbourhoods and basic services are lacking. Whereas promises to rehouse slum dwellers were once dismissed as a bad joke, today there is guarded optimism.

Fikri teamed up with another slum dweller to buy two floors of a block of flats on an estate on the edge of Casablanca.

They paid 70 000 dirhams (R74 000), of which the state gave back 30 000 dirhams. The stigma attached to Sidi Moumen's slums made it impossible for Fikri's family to improve their lot, she said.

Her brother, a police officer, had applied for a visa to travel abroad but never received it, she believed because of the address on his identity card.

"With an address like that, my children could never find work," she said.

French colonialists coined the term "bidonville" (shantytown) in Morocco a century ago, when Casablanca construction workers threw up shacks as temporary accommodation. - Reuters