BELGRADE, Serbia — A new calamity emerged Tuesday in the flood-hit Balkans even as emergency workers battled overflowing rivers and evacuated thousands: tons of drowned livestock were posing a health hazard.

With the rainfall stopping and temperatures rising, the withdrawing floodwaters revealed a harrowing sight: thousands of dead cows, pigs, sheep, dogs and other animals that were left behind after their panicked owners fled rapidly advancing torrents.

"There are tons of dead animals that we must dispose of," Serbian Prime Minister Aleksandar Vucic said at a government meeting Tuesday.

One farm near the northern Bosnian town of Samac reported losing 450 of its 500 cows.

The record flooding in Serbia, Bosnia and Croatia in past week has forced half a million people out of their homes and led to at least 40 deaths: 20 in Serbia, 18 in Bosnia and two in Croatia. Authorities say the death toll still could go higher.

Bosnia declared Tuesday a day of mourning while Serbia said it would hold three days of mourning for flood victims from Wednesday to Friday.