Some 23,000 people were forced to leave their homes in the east German city of Magdeburg after a dam burst on the flood-swollen River Elbe.
Although water levels in Magdeburg were reported to be subsiding on Monday, other parts of the state of Saxony-Anhalt remain under threat.
In Hungary, 1,200 people had to leave their homes but in the capital Budapest flood defences appear to have held.
At least 18 people have died in the floods in Central Europe.
Analysts say the damage will cost billions of euros to clean up.
The authorities in Germany are investigating an anonymous letter threatening attacks on several dams.
The motive behind the threats is not known, but the threat is being taken seriously, says the BBC’s Stephen Evans in Berlin.
With levels on the Danube peaking, the mayor of Budapest sought to reassure the city’s inhabitants and said leaking dykes had been fixed.
“Budapest is not at risk of a catastrophe, the level is not expected to rise significantly,” Istvan Tarlos said.
Firefighters and volunteers in Nagymaros lay sandbags to keep the flood waters at bay
Along more than 700km (470 miles) of the River Danube, thousands of people, including many volunteers and even convicts from the prisons, worked to reinforce earth and sandbag barriers,
More than 1,200 people have been evacuated from their homes along the river, although no flood-related deaths have yet been reported in Hungary.
In Magdeburg, the capital of Saxony-Anhalt state, more than 23,000 people left their homes on Sunday as flood waters rose to 7.44m (24ft), nearly four times higher than normal (2m).
Some 700 soldiers worked to build a dam of sandbags around a power sub-station in the badly-hit area of Rothensee in a bid to keep the power on.
The Suddeutsche Zeitung newspaper reported that flood water levels had fallen slightly in Magdeburg itself on Monday, but other parts of Saxony-Anhalt are still under threat after days of heavy rain weakened flood defences.
The 8,000-population town of Aken and its neighbouring villages were evacuated after a dam on the Elbe river burst on Saturday, the police said.
Another dam is in danger, reports the regional broadcaster MDR, and more evacuations may have to take place.
German President Joachim Gauck visited the flood-stricken city of Halle, near Magdeburg, and paid tribute to the way its inhabitants had coped.
“It is fantastic to see how different people get together to help others. And you notice that many of them are exhausted, but they are happy and it seems to motivate them,” Mr Gauck said.
The flood crest is expected to reach northern Germany in the coming days.
Chancellor Angela Merkel is planning a crisis meeting with leaders of Germany’s regions on how to share the bill for the disaster, the Leipziger Volkszeitung newspaper reported.
“We’re dealing with a national catastrophe,” Gerda Hasselfeldt, an MP with Mrs Merkel’s Christian Social Union (CSU), was quoted as saying.