Thousands of people have been evacuated from their homes in eastern Germany where the Elbe has flooded and burst through a dam, officials said on Sunday.

At least 21 people have been killed by a week of flooding in central Europe, as rivers such as the Danube, the Elbe and the Vltava have overflowed after heavy rains, causing extensive damage in central and southern Germany, the Czech Republic, Austria, Slovakia and Hungary.

The latest fatality was an 80-year-old man who died of a heart attack in Austria on Sunday while cleaning up debris caused by flooding, the German news agency dpa reported.

More than 8,000 people were evacuated by bus from the town of Aken and its neighbouring villages in Saxony-Anhalt, Germany, after a dam on the Elbe broke on Saturday, said a police spokesman, Uwe Holz.

In Magdeburg, the state's capital, more than 3,000 residents were forced to leave their homes after many streets and buildings were flooded and electricity was shut off, dpa said.

Further north on the Elbe, residents were trying to protect themselves by building levees along its banks.

Officials in Saxony-Anhalt also were investigating what appeared to be a threat to destroy dams.

Several media outlets said they had received a letter threatening to blow up dams on the Elbe, Holger Stahlknecht, the state's interior minister, said on Sunday.

"We are taking the letter seriously," he told dpa. He said authorities have stepped up their surveillance of dams and urged residents to remain calm.

In Hungary, officials said the high flood waters were expected on the Danube at Budapest late on Sunday, though river defences should protect most of the capital.

The Hungarian prime minister, Viktor Orbán, said no casualties have been reported in his country, but 7,000 soldiers and thousands of volunteers were packing sandbags on the banks of the Danube to shore up flood walls.

• This article was amended on 11 June 2013 to correct the spelling of the Vltava, from Vlatava.