Hundreds of Whaley Bridge residents have been told they can return home, nearly a week after fears over a damaged dam saw them evacuated.
About 1,500 residents were removed from their homes on Thursday after the dam at Toddbrook Reservoir was damaged during heavy rain.
Emergency services worked to repair the dam wall and lower water to safe levels to allow people to return.
Derbyshire Police said it had been an “unprecedented crisis”.
But the immediate danger posed to Whaley Bridge and areas downstream in the Goyt Valley has now passed, according to the force.
Deputy Chief Constable Rachel Swann said at 13:00 BST on Wednesday the evacuation order for Whaley Bridge and surrounding areas had been lifted.
The danger posed by the dam “which would have destroyed homes and livelihoods, could not be underestimated”, she added.
Prime Minister Boris Johnson tweeted he was “pleased to hear” residents were returning and paid tribute to their “spirit and patience”.
The first person to walk through the cordon, Liz McCann, said: “We’re home. That’s what we wanted. We’re all safe and we’re all together so there’s not a problem.
“We’d been on holiday for two weeks and we came back to this so we’ve not gone back yet.”
The BBC’s North of England correspondent Danny Savage said the evacuation “has taken an emotional toll” on residents.
“At least two people I talked to were in tears,” he said.
“There wasn’t quite a stampede to get back in but within 20 minutes traffic was flowing along the Main Street and people were heading back to their businesses and homes.”
Jennifer Grant, landlady at The Goyt Inn, said she was “relieved and pleased” to have been allowed home.
“Thursday seems like a long time ago,” she said. “It’ll be good to catch up with everyone and hear their stories. We all survived.”
Resident Bernie Sharples, said: “It’s absolutely fantastic, it’s just great to see everyone again.
“It’s been an upsetting time but it’s absolutely fantastic- all the authorities, the police, all who helped get us back here – a big thank you to everybody.”
Fifty-five households in Horwich End were allowed to return on Tuesday by police after a public meeting.
The force and other agencies will help the remaining residents return to their homes on Wednesday, with police staying in the area over the next week “to help the community and address any concerns”.
The Environment Agency (EA) has confirmed measures in place at the dam mean emergency services “will be able to manage the levels of rain forecast”.
But it said further inspections will take place as there is still “significant” work to be done to bring the dam to a condition where “long-term safety can be assured”.
Malcolm Swets, manager of Goyt Wines, said he wanted to thank everyone involved in the emergency effort for the “professional way” they had gone about their business.
He said: “Everyone’s had their problems during the disruption but at the end of the day everybody’s safe and nobody got hurt.”
Derbyshire County Council leader Barry Lewis said the authority would provide £160,000 of “additional funding” to help residents and businesses recover.