Rescue workers dug desperately for survivors on Thursday and struggled to reach areas cut off by raging floods and landslides that have killed at least 388 people in one of Brazil's worst natural disasters in decades.

Torrents of mud and water set off by heavy rains left a trail of destruction through the mountainous Serrana region near the city of Rio de Janeiro, toppling houses, buckling roads and burying entire families as they slept.

It's like an earthquake struck some areas, said Jorge Mario, the mayor of the Teresopolis municipal area, where at least 168 people died.

There are three or four neighbourhoods that were totally destroyed in rural areas. There are hardly any houses standing there and all the roads and bridges are destroyed.

The mudslides swept away the homes of rich and poor alike in and around Teresopolis and other towns, but the brunt of the disaster was borne by poorer rural residents in houses built in risky areas without formal planning permission.

Television images showed rescuers desperately trying to haul residents from raging flood waters. One woman holding a dog in the ruins of her house as powerful waters tore at the remaining walls. She grabbed a rope thrown by residents from a nearby rooftop and was eventually pulled to safety, after dropping the dog into the vicious current.

Rescuers dug desperately in the ruins of houses in search of survivors, often finding only corpses. One success came when a six-month-old baby was rescued alive from the rubble of a house, drawing cheers from residents.

In Nova Friburgo, a rural town first settled by Swiss immigrants, 168 people died, according to local officials.

Heavy rains earlier this week killed 13 people in Sao Paulo state, bringing the total number of deaths in southern Brazil to at least 401.

The disaster poses an early challenge for new President Dilma Rousseff, who took office less than two weeks ago and was due to fly over the region on Thursday.

Beside the loss of life and property, the damage from the rains that have hit much of southern Brazil could further boost rising food prices. a major concern for the government.

The small Serrana region is an important producer of fruit and vegetables for the Rio area, but the floods have not affected Brazil's main crops such as soy, sugar cane and coffee.

Hillsides and riverbanks in the area about 100 km north of Rio, which will co-host the 2014 World Cup and host the 2016 Olympics, collapsed after the equivalent of a month's rain fell in 24 hours from Tuesday.

Folha de Sao Paulo newspaper said it was the worst natural disaster to hit Brazil in four decades. More heavy rain is forecast for the coming days, complicating rescue efforts and raising the risk of further mudslides.

Raging flood waters and rivers of mud totally submerged some houses and left cars crumpled like tin cans. More then 13,500 people were made homeless in the region, the Civil Defence agency said.

Mario said rescue teams had yet to reach several of the worst-hit parts of Teresopolis, including one neighborhood where media reports said around 150 houses were destroyed.

LINES OF BODIES

Dozens of bodies were lined up outside a police station in the city centre awaiting identification before being moved to a church, local taxi driver Vinicius Bittencourt told Reuters.

The bodies were there because there is no more space in the morgue, he said. People are walking in the street crying. I've seen people carrying dead children wrapped in blankets.

At least 39 people also died in Petropolis, a picturesque town nestled in the mountains that served as the summer residence for Brazil's royal family in the 19th century.

Another 13 people died in the town Sumidouro in the same region, officials said.

Many stranded residents were forced to fend for themselves as rescue operations were hampered by destroyed roads and treacherous terrain.

Firefighters used heavy machinery to remove debris from roads that was blocking their path to some of the worst-affected areas.

The situation is critical, but we have to advance, we can't stop, said fire department colonel Jose Paulo Miranda.

Rousseff, who took office on January 1, has made 780 million reais (290 million pounds) in emergency aid available for the rescue and reconstruction efforts. The government said it was sending 210 troops from the National Public Security Force, including officials to help identify bodies.

Two Navy helicopters are assisting rescue operations and the Navy is also sending a mobile field hospital to the area.

Landslides and flash floods are common in much of Brazil, often exposing poor urban planning and a lack of preventive action by authorities.

More than 60 people died in mudslides in the coastal resort of Angra dos Reis in January 2010, and about 180 people died when landslides devastated slum communities in Rio last April.