SIDI MOUMEN, Morocco (Reuters) - A slumping world real estate market has given new impetus to Morocco's plans to demolish its shanty towns, 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 have been cleared of slum areas since 2004 and 50,000 shacks were destroyed last year, Housing Minister Taoufiq Hejira said in January. He is aiming for similar numbers in 2009.
Zahidi Elarbi, a member of a voluntary development association in the Casablanca suburb of Sidi Moumen, said about half the residents of its most notorious slums -- Thoma and Douar Esquila -- have 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 by 2012 and several firms including Morocco's biggest real estate developer Addoha have announced a new focus on low-income housing.
The north African country's biggest building materials manufacturer, Lafarge Ciments, says demand for its cement is 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 center 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 neighborhoods 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 beats down on the corrugated iron roofs, turning homes into ovens.
Several unofficial mosques opened in Sidi Moumen in the 1990s, some with radical imams who organized vigilante squads to patrol the slums and punish crime and immoral behavior.
The mosques were closed or demolished after the 2003 attacks, when the state tightened control over religious preaching.
More radicalized 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 still avoid their neighborhoods and basic services are still lacking.
Whereas promises to rehouse the 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 an apartment block on an estate on the edge of Casablanca. They paid 70,000 dirhams ($8,000) of which the state gave back 30,000.
The stigma attached to Sidi Moumen's slums made it impossible for Fikri's family to improve their lot, she said. Her brother, a policeman, applied for a visa to travel abroad but never received it, she believes 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" (shanty town) in Morocco almost a century ago when Casablanca construction workers threw up shacks as temporary accommodation.
Slums can be found anywhere in Morocco's northern towns, near motorways, railways and supermarket car parks, in the shadow of luxury villas and on the Atlantic seafront in the capital, Rabat.
Previous eradication programs failed as officials kept turning a blind eye to illegal building in return for a cash bribe.
Entire neighborhoods mushroomed without proper planning including Lahraouiyine in Casablanca, nicknamed "The Chechens" for its chaotic, bombed-out appearance.
Police made 118 arrests this year in a crackdown on corruption, influence-peddling and unauthorized building in Lahraouiyine.
Today, many slum-dwellers are reluctant to leave, fearing the new apartments are too small for their large families or demanding compensation for the land they are vacating.
Some born and raised there are daunted by the anonymous apartment blocks, where friendships and support networks needed to survive poverty must be rebuilt from scratch.
"I'm not saying it's all peace and love around here," said jobless electrician Aziz Dhahabi, 25. "But if someone falls ill, he gets all the solidarity and support he needs from his neighbors. That's not something you find elsewhere."
Writing by Tom Pfeiffer; editing by Andrew Dobbie