Rains eased and waters receded in the worst-hit areas of central and western Serbia and north-east Bosnia yesterday, but the River Sava was forecast to continue rising in the Serbian capital Belgrade.
The Sava burst its banks after days of torrential rain in the former Yugoslav republics, flooding towns and cutting power to tens of thousands of homes.
Thousands of soldiers and volunteers worked through the night to build a sandbag barrier three miles long to protect Serbia's Kostolac coal-fired power plant, which currently provides 20% of Serbia's electricity.
But waters from the River Mlava broke through early yesterday, threatening the Drmno coal-mine deposits near the Kostolac plant.
"The army, police, volunteers and Kostolac employees are using all mechanisation and are piling up sandbags to slow the river flow and prevent it from entering the power generation system," a spokeswoman for Serbia's EPS power distributor said.
Flooding had already cut Serbian power generation by 40%, forcing the cash-strapped Balkan country to boost imports. Prime Minister Aleksandar Vucic said a fire and flooding of surface mines at the 1300 megawatt Kolubara coal-fired power plant southwest of Belgrade had caused damage of at least €100 million (£81m).
Authorities say the economic impact of the floods will be huge, devastating the agricultural sector vital to both the Serbian and Bosnian economies.
"The danger today is less than it was yesterday, but we have to control the Sava as much as we can," Prime Minister Aleksandar Vucic said.
"These are the kind of waters not seen in 1000 years, let alone 100."
He said two bodies had been recovered from the worst-hit Serbian town of Obrenovac, some 20 miles southwest of Belgrade.
Predrag Maric, the Interior Ministry's head of emergency situations, said the death-toll in Serbia so far was five, with one person missing. More fatalities were expected.
In Obrenovac, members of a rafting club from the southern Serbian town of Raska joined rescue efforts.
They were bringing out elderly men and women on their backs after they had spent days spent without electricity in flooded homes.
In Bosnia, 19 people were confirmed dead by Saturday, with nine bodies recovered from the north-eastern town of Doboj after what the regional police chief described as a "tsunami" of water 10ft to 13ft high.
Reports from the scene said half the town was still submerged. Bosnian soldiers distributed food and medical supplies by truck, boat and bulldozer. Cranes lifted medical workers into the top floors of some homes and removed stranded residents from others.
On Sunday, two Russian Ilyushin-26 cargo planes landed in Serbia carrying food, generators and rescue boats.
Rescue teams, humanitarian aid, water pumps and generators have arrived from Russia and several European Union member states, including the UK, Germany and Austria. Support has also come from Serbia and Bosnia's fellow ex-Yugoslav republics.
Some 20,000 people have been had to leave their homes in Serbia, and at least 13,000 have in Bosnia. Donations of clothes and food poured into collection centres set up in Belgrade.
"I carried my kids out on my back, then waited 12 hours to be rescued myself," said 40-year-old Obrenovac resident Dragan Todorovic, who spent the night in a Belgrade sports hall with dozens of other families.
"The house was new, built two years ago for €100,000. What now?"
In Bosnia-Hercegovina, landslides have buried houses and disturbed landmines laid during the war in the 1990s. Seen from the air, the north-east third of Bosnia resembles a huge muddy lake, with houses, roads and rail lines submerged. About a million people live in the worst-affected areas.
The floods are also affecting Croatia, where thousands have fled their homes after three months' worth of rain fell in a three days.