Egyptian authorities say they have pulled 31 bodies out of the rubble of a Cairo shanty town crushed by massive boulders.

An Egyptian security official says hospitals have also treated 46 wounded people, but there are still many people believed to be buried under the hundreds of tons of rock that peeled away from the Muqattam cliffs.

The official spoke Sunday on condition of anonymity because he was not authorized to speak to the press.

Large numbers of riot police are stationed the slum near the capital Cairo and are forcing residents and journalists to clear the area so that heavy machinery could be brought in to clear the massive rocks.

Frantic residents in the sprawling Manshiyet Nasr slum were digging by hand and trying to lift huge rocks to reach any survivors, shouting out the names of relatives and family members trapped below. Haidar Baghdadi, the parliamentarian for the region, told Al-Jazeera television buried residents were calling for help from under the rubble using their cell phones.

At least eight boulders, some the size of small houses, peeled away from the towering Muqattam cliffs and buried about 50 homes in the slum, one of many densely populated shantytowns ringing the city of 17 million. Manshiyet Nasr is home to 1.2 million people, according to Baghdadi.

Six-year-old Mustafa Ibrahim was pulled from the rubble and later regained consciousness in a hospital, shouting, "Where is my mother, where is my father?" But his parents and three brothers had all perished.

By nightfall, no heavy equipment was being used to clear debris. A single bulldozer sat stranded because it couldn't move through the slum's narrow streets and authorities planned to demolish some buildings to clear the way.

In their frustration, police and residents exchanged angry words.

Workers brought in flood lights, indicating the rescue effort would continue into the night.

The collapse occurred in the early morning when most residents were sleeping, having awoken earlier to eat ahead of the daytime fast for Islam's holy month of Ramadan.

"It was as if a knife sliced the cliff into pieces," said 27-year-old resident Sayyed Rashad.

The area was covered by a thick layer of dust and the scene was chaotic as men and women screamed in grief and blamed the government for a slow rescue operation.

After sundown, residents broke their daily fast amid the ruins. Most rescue efforts appeared to stop until cries for help from under the rubble prompted some to start digging again.

Slums such as Manshiyet Nasr at the base of the Muqattam cliffs are filled with migrants from the countryside looking for work in Cairo, which suffers from a severe housing shortage. Buildings on top of the cliffs and below are crudely built and lack basic services, contributing to the instability of the vast plateau.

There are periodic rock slides on the edges of the brittle Muqattam hills. In 2002, 27 people were killed in another rock slide in the same area, Baghdadi said.

"The reason the rocks keep falling is because there is no sewage system and their wastewater is eating away at the mountain," Hani Rifaat, a local journalist who has been following the issue, told AP from the site of the disaster.

Sewage could be seen pouring down from residential areas on top of the plateau, prompting fears of another collapse.

Baghdadi told the AP the area was known to be dangerous, but the government had resettled only a fraction of the residents to safer government housing.

"No warning works. As long as you can't provide new housing and an alternative, no one moves," he said.

The government said survivors would be transferred to new housing for the night and given all necessary aid.

"We are following the case step by step and providing the care and comfort for the residents," Prime Minister Ahmed Nazif said in a statement. "We would like to remind people the danger of building informal housing in dangerous areas."

Resident Mohammed Hussein said contractors have been working on shoring up the cliffs as they became increasingly unstable, but they could not complete their work until the government resettled the community below.

"The contractor who is stabilizing the mountain asked the government to resettle everyone at least 32 miles from the mountain because he didn't want the rocks he was removing to fall on the people," Hussein told AP Television News. "The rocks are soaked with water and so are more brittle and prone to falling."

The rock slide and the slow response comes after a string of other disasters in the country led to accusations of government neglect and incompetence. Among them, a fire that gutted the upper house of parliament in August, a fire that destroyed another Cairo slum in 2007 and a ferry disaster that claimed 1,000 lives in 2006.