* Volunteers and soldiers build sandbag defences
* At least 40 killed in Balkan region
* Bosnia says 1 million cut off from clean water
* Serbia says damage runs to hundreds of millions of euros (Adds Serbian president, updates toll, displacement)
By Daria Sito-Sucic and Marko Djurica
MAGLAJ, Bosnia/KRUPANJ, Serbia, May 19 Bosnia said on Monday that more than a quarter of its 4 million people had been affected by the worst floods to hit the Balkans in living memory, comparing the "terrifying" destruction to that of the country's 1992-95 war.
The extent of the devastation became apparent in Serbia too, as waters receded in some of the worst-hit areas to reveal homes toppled or submerged in mud, trees felled and villages strewn with the rotting corpses of livestock.
The regional death toll reached more than 40, after the heaviest rainfall since records began 120 years ago caused rivers to burst their banks and triggered hundreds of landslides.
"The consequences ... are terrifying," Bosnian Foreign Minister Zlatko Lagumdzija told a news conference. "The physical destruction is not less than the destruction caused by the war."
Lagumdzija said more than 100,000 houses and other buildings in Bosnia were no longer fit to use and that over a million people had been cut off from clean water supplies.
"During the war, many people lost everything," he said. "Today, again they have nothing."
His remarks threw into sharp relief the extent of the challenge now facing the cash-strapped governments of both Bosnia and Serbia.
Serbian Prime Minister Aleksandar Vucic said the cost in Serbia would run to hundreds of millions of euros. President Tomislav Nikolic appealed for outside aid.
"We expect huge support, because not many countries have experienced such a catastrophe," he said.
Even as the crisis eased in some areas, a new flood wave from the swollen River Sava threatened others, notably Serbia's largest power plant, the Nikola Tesla complex, 30 km (18 miles) southwest of the capital Belgrade.
In Bosnia, Assistant Security Minister Samir Agic told Reuters that up to 35,000 people had been evacuated by helicopter, boat and truck. As many as 500,000 had left their homes of their own accord, he said, in the kind of human displacement not seen since more than a million were driven out by ethnic cleansing in the Bosnian war two decades ago.
At least 25,000 people have been evacuated in Serbia, but many more are believed to have fled the flooding.
Hundreds of volunteers in the Serbian capital filled sandbags and stacked them along the banks of the Sava. Police issued an appeal for more bags.
Soldiers and energy workers toiled through the night to build barriers of sandbags to keep the water back from the Nikola Tesla complex and from the coal-fired Kostolac power plant, east of Belgrade.
Djina Trisovic, a union spokeswoman at Serbia's EPS power utility, said some workers at the Nikola Tesla plant had worked three days with barely a break because relief teams could not reach the plant.
"The plant should be safe now," she told Reuters. "We've done all we could. Now it's in the hands of God."
The plant provides roughly half of Serbia's electricity. Parts of it had already been shut down as a precaution, but it would have to be powered down completely if the waters breached the defences.
Flooding had already caused considerable damage, estimated by the government at over 100 million euros ($140 million), to the Kolubara coal mine that supplies the plant.
Authorities in Bosnia issued a fresh warning about the danger of landmines left over from the war and now dislodged by the flooding.
In the north Bosnian region of Maglaj, barely a single house was left untouched by the waters, which receded to leave a tide of mud and debris.
In the village of Donja Polja, where Muslim Bosniaks returned in 1995 to homes burned or shelled during the war, Hatidza Muhic swept the mud from the hallway of her house. Dark lines on the walls indicated the water had reached some 3 metres high.
"I thought the war was as bad as it can get, but it can get worse," Muhic said. "I just pray to God that we can save our minds, because first we were hit by the war, and now this." ($1 = 0.7297 euros) (Additional reporting by Ivana Sekularac and Matt Robinson in Belgrade, Maja Zuvela in Sarajevo, Igor Ilic and Zoran Radosavljevic in Zagreb; Writing by Matt Robinson; Editing by Alison Williams)