KHERSON, Ukraine (AP) — Floodwaters from a collapsed dam kept rising in southern Ukraine on Wednesday, forcing hundreds of people to flee their homes in a major emergency operation that brought a dramatic new dimension to the war with Russia, now in its 16th month.

Amid the disaster response, artillery shelling rang out as people scrambled to get out of the danger zone, climbing onto military trucks or rafts.

Officials said the flood’s force was expected to slacken as the day wore on, a day after Tuesday’s breach of the Kakhovka hydroelectric dam and reservoir, which is one of the largest in the world.

Even so, authorities said water levels were expected to rise by another meter (about 3 feet) over the following 20 hours and engulf more downriver areas along the banks of the Dnieper.

Some local residents spent the night on rooftops. Others, scrambling to flee the rising waters, were evacuated by buses and trains with the belongings they could carry.

“The intensity of floods is slightly decreasing," Oleksandr Prokudin, the head of Kherson Regional Military administration, said in a video. "However, due to the significant destruction of the dam, the water will keep coming.”

He said more than 1,800 houses were flooded along the Dnieper and that almost 1,500 people had been evacuated.

Residents sloshed through knee-deep waters in inundated homes as videos posted on social media showed scenes including rescue workers carrying people to safety, and what looked like the triangular roof of an entire building that had been uprooted drifting downstream. Footage taken from the air showed waters filling the streets of the Russian-controlled city of Nova Kakhovska on the eastern side of the river.

Nova Kakhovska's Russia-appointed mayor, Vladimir Leontyev, said seven people were missing but early signs indicated that they could be alive. Officials in Russia-controlled parts of Kherson region said 900 Nova Kalhovka residents were evacuated, including 17 rescued from the tops of flooded buildings.

Ukraine accused Russian forces of blowing up the dam and adjoining power station, which sits in an area Moscow has controlled for more than a year. Russian officials blamed Ukrainian bombardment in the contested area for the collapse of the dam's wall, where the river separates the two sides.

The Institute for the Study of War, a Washington think tank, noted its earlier assessment that “the Russians have a greater and clearer interest in flooding the lower Dnieper despite the damage to their own prepared defensive positions.”

Amid speculation that Ukraine may have secretly started its long-anticipated counteroffensive, the ISW said Russian forces may think breaching the dam could cover a possible retreat and delay Ukraine's push.

Experts noted that the dam, about 70 kilometers (44 miles) to the east of the city of Kherson, was believed to be in disrepair and vulnerable to collapse as water was already brimming over when the wall gave way. It hadn't been producing power since November, according to officials.

Britain’s Ministry of Defense, which has regularly issued updates about the war, said the Kakhovka reservoir was at “record high” water levels before the breach. While the dam wasn’t entirely washed away, the ministry warned that its structure “is likely to deteriorate further over the next few days, causing additional flooding.”

The dam helps provide irrigation and drinking water to a wide swath of southern Ukraine, including the Crimean Peninsula, which was illegally annexed by Russia in 2014.

Underscoring the war’s global repercussions, wheat prices jumped 3% after the collapse. Ukraine and Russia are key global suppliers of wheat, barley, sunflower oil and other food to Africa, the Middle East and parts of Asia.

Both sides warned of a looming environmental disaster from polluted waters, partly caused by oil leaking from the dam’s machinery. The empty reservoir could later deprive farmland of irrigation.

Officials from Russia and Ukraine, and the U.N., have said that the damage will take days to assess, and warned of a long recovery period.

___

Associates Press reporter Illia Novikov in Kyiv contributed to this report.