Rio de Janeiro, Brazil (CNN) -- Thousands of families living on mountain slopes or on riverbanks face extreme risk of being washed away in the heavy rains and flooding that have killed nearly 500 people in Rio de Janeiro state, authorities say.
Officials feared that many more were dead, buried in landslides or washed away by gushing waters. Mud rushed down hillsides and into towns and cities as murky brown rivers cut through lush landscape.
President Dilma Rousseff flew over the affected areas Thursday and landed in a slushy, trash-littered soccer field in the city of Friburgo, the official Agencia Brasil news agency said.
She trudged through mud in her rain boots to talk to residents in a neighborhood where four of seven firefighters attempting to rescue people were buried under mud. Three others were pulled out alive.
"We are going to take firm action" to help the devastated areas, Rousseff said.
Brazilian authorities have been criticized for a lack of disaster planning and allowing people to build homes in areas known to become treacherous in the rainy season.
The roofs of houses and treetops peeked out from the water. People used inflatable rafts or inner tubes to navigate submerged roads. One family sat perched on the roof of their house, their predicament broadcast on television.
With more rains forecast, Brazilian authorities have ordered evacuations for at least 5,000 families living in especially perilous areas in Rio de Janeiro state, Agencia Brasil said.
Another 3,000 families from a mountainous region were homeless and sheltered in schools and gymnasiums, the news agency said.
"The most important thing right now is to assist the homeless population and reach the most critical points," said Rodrigo Neves, the state secretary of Social Welfare and Human Rights.
State health officials pleaded for people to donate blood that will be sent to the Serrana region where only 36 units of blood remained for treatment of flood victims.
The death toll for the state of Rio climbed Thursday to 495, with 214 in Nova Friburgo, 222 in Teresopolis and 40 in Petropolis, according to Civil Defense numbers. Another 19 deaths occurred in Sumidouro, according to Agencia Brasil.
In Teresopolis, schools and police stations served as morgues where people waited to identify their family and friends. Mayor Jorge Mario Sedlacek declared his city a natural disaster area.
In neighboring Sao Paulo, at least 24 people died as heavy rain continued to batter parts of the state, authorities said.
Aline Silva told Agencia Brasil that she and her three children narrowly escaped a landslide in Rio de Janeiro's Feu district. She said they heard a thud and then ran out with a few vital documents and the clothes on their back.
They lost everything else.
Rescue operations by ground and air continued Thursday, but collapsed roads and bridges made it difficult for rescuers to reach some areas.
Sao Jose dos Campos, about 100 kilometers (62 miles) from the heavily populated city of Sao Paulo, has been hardest hit by the flooding in that state, a Sao Paulo fire official said. Freiburg was without electricity, water and gas and most businesses remained shuttered Thursday.
The weather also caused delays and cancellations of flights at major Brazilian airports, Agencia Brazil said.
The deluge in this part of Brazil began with the new year and rain is predicted to continue until the end of the week. On Tuesday alone, almost 8 inches of rain fell in the affected areas. A year ago, heavy rains caused dozens of deaths in Brazil's southeast coast.
Journalists Luciani Gomes, Fabiana Frayssinet and Helena DeMoura contributed to this report