North-eastern Brazil is experiencing its worst flooding in decades
Tens of thousands of people in north-eastern Brazil have begun returning home, after devastating floods there.
Civil defence helicopters, boats and lorries have been ferrying food and other supplies to the affected area.
Officials say the death toll declined from 42 to 39, as some deaths were not flood-related. Some 274,000 people have fled their homes.
Floodwaters are subsiding in some areas but some rivers are reported to be still rising rapidly in Amazonas state.
The fear now is that diseases could start to spread, says the BBC's Gary Duffy in the town of Bacabal, Maranhao state.
The flooding has washed bodies out of the local cemetery and many animals have been killed, our correspondent says.
Despite this, some local people have been drinking the water are refusing to leave their homes, partly because of the fear of looting.
Concern is also growing over the possibility that the flooding could spread further inland to cities like Manaus, as the waters of Rio Negro, which feeds the Amazon, have been rising rapidly in recent days.
The unusually heavy rains have hit many regions used to downpours but also the arid north-east of Brazil.
Among the worst-hit areas is Maranhao, where 65,000 people have had to leave their homes.
The town of Trizidela do Vale is said to be almost completely flooded.
Across the north and north-east, some one million people are said to have been affected by the floods.
The Rio Negro is just 74cm (29in) below a record high set in 1953, the state-run Agencia Brasil news agency reported.
President Luiz Inacio Lula da Silva said the floods and drought in two southern states signalled climate change.
"Brazil is feeling climate changes that are happening in the world, when there is severe drought in areas that don't have drought, when it rains too much in places where it doesn't rain," President Lula said in his weekly radio address earlier this week.