Some 90% of buildings in the evacuated Canadian city of Fort McMurray have survived the massive wildfire, Alberta's provincial premier said on a visit.
Rachel Notley said the hospital and most schools were intact but 2,400 out of 25,000 structures had been burnt.
"It was a miracle we got the entire population out safely," she told reporters.
Prime Minister Justin Trudeau will visit Fort McMurray on Friday.
He said he will be going to "offer up support for all Canadians".
More than 80,000 people were evacuated from the oil sands city last week.
Nobody was killed in the fire but two people died in a car crash when they were leaving the city.
Officials said they hoped to provide a schedule within two weeks for the return of residents.
The provincial government declared a state of emergency and promised C$100m (£53m, $77m) in cash to evacuees whose homes have been gutted.
The battle to contain the wildfires reached a turning point on Monday thanks to drizzle and favourable winds, officials said.
At the scene: Laura Bicker, BBC News, Fort McMurray
The fire has been brutal. Family neighbourhoods have been reduced to a mass of melted metal and blackened concrete. Only the foundations remain. Everything that made these houses a home has gone.
It is clear the fire has been unpredictable - in some parts an entire street has been destroyed and the next street is still untouched. The main buildings in Fort McMurray have not been harmed, but the city is still not safe.
There are some areas which are still smouldering and there is no power, water or gas.
Ms Notley visited the city for a first look at the destruction caused by the massive fire. She said she was "very much struck" by the power it had to cause devastation.
"The city was surrounded by an ocean of fire only a few days ago," she said.
"It was quite overwhelming in some spots.
"First responders and repair crews have weeks of work ahead of them to make this city safe for the people of Fort McMurray and the surrounding communities.
"But it is going to be made safe. It is a home you will return to."
The wildfire covered 1,610 sq km (622 sq miles) on Sunday morning, Ms Notley said, and was about 30-40km from the neighbouring province, Saskatchewan.
The gas in Fort McMurray has been turned off and the power grid is damaged, while the water is not drinkable.
The team from the provincial government will begin preliminary planning on repairing damage in the city.
Some officials are optimistic.
Member of Parliament David Yurdiga, who toured the area on Sunday, said: "All of the key infrastructure is in place. Our hospital is standing. Our schools are standing. Our treatment plan is functioning."
He said that in some areas, "You don't even know there was a fire".
Have you been affected by the wildfires in the Fort McMurray area? You can email email@example.com with your experiences.
Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: