Five days of continuous torrential rains have left four people dead and displaced thousands in Brazil, government and media say.

Rivers overflowed and flooded 58 cities and towns across the far-southern state of Rio Grande do Sul, the state's Civil Defense Agency said in a statement.

"More than 4,000 people were evacuated," the statement said

Seventeen communities declared a state of emergency in the flooded area.

According to Folha news agency, four people have lost their lives due to the heavy rains.

Many residents initially refused to leave, fearing their abandoned houses would be looted, but the rising waters eventually forced them out.