More than a thousand local residents left their homes due to fears over the damaged dam (Picture: PA).
Residents of evacuated Whaley Bridge have been told it is safe to return to their homes.
Derbyshire Police said stability of the dam wall at Toddbrook Reservoir had been achieved at 1pm on Wednesday.
More than 1,500 people had been evacuated from the Derbyshire town since Thursday following heavy rain, although a small number refused to leave their properties.
Military crews including an RAF Chinook have been working in the area to shore up the dam which was at risk of collapse.
Prime Minister Boris Johnson has thanked the Armed Forces for their "professionalism and dedication" in responding to the situation.
Defence Secretary Ben Wallace also joined in with the praise: "Time and time again, the UK military shows it is able to support the wider public sector in its time of need.
"Along with the residents of Whaley Bridge, I want to thank everyone involved for their hard work that has ensured the safety of the community."
Police allowed 55 households in the Horwich End area of the town to return home following a public meeting on Tuesday afternoon after the target water level was reached.
After allowing residents to return home, Deputy Chief Constable Rachel Swann said the danger posed by the dam "which would have destroyed homes and livelihoods could not be underestimated".
She continued to say further work will be done to determine the damage caused to the dam wall and what the future holds for the structure.
Deputy Chief Constable Swann said: "The hard work and dedication to achieve this has been quite simply incredible and means that I am now able to lift the evacuation order placed on Whaley Bridge and the surrounding area."
She added that further work will take place over the coming weeks to assess the dam caused to the dam.
The Environment Agency said there is still "significant" work to be done to bring the dam to a condition where "long term safety can be assured".
The military was first deployed to the area last week, with a Chinook based at RAF Odiham dropping hundreds of tonnes of aggregate.
Teams from the Joint Helicopter Support Squadron loaded the aggregate on to the Chinook and then flew and deposited the sandbags on to the dam.
More than 40 soldiers from the Light Dragoons helped block a critical sluice gate with sandbags to prevent more water entering the damaged dam.