People stand by the bodies of mudslide victims after heavy rain in the neighbourhood of Caleme in Teresopolis, Brazil, on Wednesday. ((Paulo Cezar/Agencia O Globo/Associated Press))

Torrential rain tore through the mountains near the Brazilian city of Rio de Janeiro, killing at least 257 people in 24 hours, the state's emergency rescue office said Wednesday.

Some survivors clung to trees to escape the water and landslides.

Rescuers used heavy machinery, shovels and bare hands to dig through debris to search for survivors. It was not immediately clear how many people were rescued. At least 50 remained missing, and officials feared that figure would rise.

The death toll is expected to rise as firefighters reach remote valleys and steep mountainsides where neighbourhoods were destroyed by mudslides and flooding, said Jorge Mario Sedlacek, the mayor of Teresopolis, a mountain town 56 kilometres north of Rio where at least 130 of the deaths occurred.

About 1,000 people there were left homeless.

"This is the largest catastrophe in the history of this town," Sedlacek said in an interview with Globo TV.

With the new disasters, more than 300 people have now died in flooding or mudslides since Christmas in southeastern Brazil.

President Dilma Rousseff signed a measure Wednesday sending $461 million to towns in Rio and Sao Paulo states that were damaged during the recent rains. The money will go to repairing infrastructure and preventing future disasters.

The president planned to fly over the most severely damaged parts of Rio on Thursday.

Eight people died in the neighbouring mountain town of Nova Friburgo, including four firefighters who were engaged in the rescue effort, according to a statement by Rio de Janeiro state's civil defence authorities. A landslide hit a fire truck and three firefighters remained missing Wednesday.

Two elderly people were among 20 who died in Petropolis, also in Rio's Serra dos Orgaos mountains.

Heavy rainfall also caused havoc earlier in Minas Gerais state north of Rio, where 16 people died in the past month and dozens of communities are in a state of emergency.

In Sao Paulo, flooding paralyzed main thoroughfares in the city since Sunday and 21 people died in collapsed homes, mudslides and flooding throughout the state.

Rio state Gov. Sergio Cabral called on the navy to lend helicopters to firefighters working as rescuers.

"We mourn the loss of lives in this tragedy caused by the rain," said Cabral in a statement.

The storm ended Wednesday morning, but the waterlogged terrain remains unstable and a threat to communities built on the steep hillsides.

Intense summer rain often causes landslides and sudden flooding in Rio de Janeiro, threatening especially the slums. In April, 214 people died when heavy rain unleashed a mudslide, swallowing 40 homes in a hillside shantytown.