(CNN) -- Heavy rains and flooding in Brazil have been blamed for 171 deaths in the states of Rio de Janeiro and Sao Paulo, officials said Wednesday.

The greatest damage was in a cluster of towns in a mountainous area northeast of the city of Rio from Tuesday night to Wednesday morning, where civil defense officials said 147 lost their lives.

That included 114 people reported killed in Teresopolis by a mudslide, local officials told CNN. Some 1,000 others were left without shelter and were being moved to a local gym and schools.

And, in nearby Petropolis, 18 deaths were recorded, the state government said, according to Agencia Brasil. Three deaths were reported in Itaipava, while in Nova Friburgo there were 12.

Among the victims in Rio state were three firefighters who were involved in rescue operations when they were buried by a subsequent mudslide, Agencia Brasil reported. A fourth firefighter remained missing.

Nearly 75,000 people were without power in the region as a result of the heavy storms.

Teresopolis Mayor Jorge Mario Sedlacek declared his city a natural disaster area. He told CNN affiliate TV Globo that at least 80 rescuers have been sent to the region.

Meanwhile, in the state of Sao Paulo, at least 24 people were dead as heavy rain continued to batter parts of the state, authorities said.

It has been raining since January 1, and the deluge could continue until the end of the week, forecasters have said.

The flooding has caused mudslides, officials said Tuesday. The Mairipora Dam gave way, adding to the woes in the area, said Ramos Junior, a captain at the Sao Paulo Civil Fire Department.

Sao Jose dos Campos, about 100 kilometers (62 miles) from the city of Sao Paulo, has been hardest hit by the flooding, Junior said.

In January last year, heavy rains caused dozens of deaths in Brazil's southeast coast. Torrential rains caused deadly mudslides in the resort area of the town of Angra dos Reis.