WHALEY BRIDGE, England (Reuters) - A British military helicopter dropped sacks of ballast onto the outer slope of a reservoir dam in central England on Friday in an effort to prevent it from collapsing and flooding the town below.

Police were evacuating more than 6,000 residents of Whaley Bridge, telling them to take pets and any medication they needed with them after the dam was badly damaged during heavy rains.

Prime Minister Boris Johnson visited the area on Friday evening, meeting affected residents and emergency services. “I flew over the dam and it looks pretty scary,” he said.

Officials said the dam, holding back 300 million gallons of water, was in danger of failing, putting lives at risk.

“The structural integrity of the dam wall is still at a critical level and there is still a substantial risk to life should the dam wall fail,” the assistant chief constable of Derbyshire police, Kem Mehmet, told a news conference.

Engineers have been pumping water out of the reservoir to get the level down, reduce pressure on the wall and allow repairs to begin.

Police said the level had fallen by 0.5 meters (20 inches) but still needed to drop by several more meters until it was below the damage - an operation that could take several days.

Slideshow ( 19 images )

A Royal Air Force Chinook helicopter was shifting 400 tonnes of aggregate - a mixture of sand, gravel and stone - onto the reservoir wall to reinforce it.

Evacuated residents would be allowed to briefly return to their homes to collect animals and belonging under police escort.

Britain’s Environment Agency issued a severe flood warning for the area, saying river levels in the River Goyt, which runs through the town, could rise rapidly.

Heavy rain this week led to flash floods in areas across northern England causing bridges to collapse and road closures. Britain’s Met Office said on Wednesday downpours had led to 50 mm (2 inches) of rain falling in just one hour.

Gary Lane, the Royal Air Force liaison officer at the scene, said the helicopter only had a narrow space to drop the sacks of aggregate to avoid putting pressure on the dam.

“It’s a bit like a big Lego block that we’re building, we’ve got a foundation in there and we’re carrying on building each on top of each other,” he said.