One person was killed and thousands were evacuated as the fire spread fanned by strong winds.
Officials said they would bring charges against the owner of an illegal landfill site, where the fire is believed to have started.
Last year, a fire severely damaged Valparaiso, a World Heritage site.
National Forestry Corporation Director Aaron Cavieres said the fire had been "pretty well contained" and that people who had been evacuated were being allowed to return to their homes.
A red alert, the highest there is, remains in effect in case the wind should change and rekindle the fire.
More than 500 hectares were burned since the blaze started on Friday.
A 66-year-old woman died of a heart attack, thought to have been brought about by the fire.
Nineteen firefighters were injured, five of them seriously.
The fire was reportedly started at an illegal landfill, where molten metal was dumped.
The blaze comes less than a year after 15 people were killed and more than 3,000 homes were destroyed in Valparaiso by another fire.

Media playback is not supported on this device
The 32-year-old Ivory Coast midfielder becomes only the third player, after Nigerians Nwankwo Kanu and Jay-Jay Okocha, to receive the honour twice.
Football fans voted for Manchester City's Toure, who first won in 2013, ahead of Yacine Brahimi, Pierre-Emerick Aubameyang, Andre Ayew and Sadio Mane.
"I am very proud. To receive this dedication from the fans is unbelievable," Toure told BBC Sport.
"Also I want to pay tribute to the other nominees. African football is growing up, becoming much better and we have fantastic young players coming through now."
Toure described all five nominees as "champions".
He added: "I am delighted and very happy. And as an African player, I want to lead all my younger brothers to be successful in the future.
"When I was a kid I was always dreaming of being an important player. I have sacrificed a lot.
"I will continue to try to win a trophy every year, I will fight to win a personal trophy."
Two of the beaten nominees have won the award before, Algeria's Brahimi in 2014 and Ghanaian Ayew in 2011. Gabon's Aubameyang was on the shortlist for the third year running, while Senegalese Mane made it for the first time.
Toure has been nominated for the award seven times and his second win ensures his year ends with a trophy, just as it began when he led Ivory Coast to glory at the Africa Cup of Nations.
He captained the team in Equatorial Guinea and opened the scoring in the semi-final to put his side on course for a 3-1 victory over Democratic Republic of Congo.
Toure was a key influence as his country ended a 23-year wait for their second Nations Cup title, overcoming Ghana in a penalty shootout in the final.
It was Toure's first trophy with the national team in his sixth Nations Cup tournament, having lost in two finals - in 2006 and 2012.
There was less success for Toure with Manchester City, who failed to defend their English Premier League 2014 title and finished second to Chelsea.
But Toure remains a powerful presence in the heart of the midfield and contributed seven goals for City in the calendar year.
Vera Kwakofi, Current Affairs Editor, BBC Africa, said: "Yaya Toure's leadership for country and club offers an example for many young footballers aspiring to emulate his career.
"We are pleased that as the BBC we are here to celebrate and share in this moment with his fans around the world."
Firefighters in Chile say they have managed to control a huge forest fire around the port cities of Valparaiso and Vina del Mar.
[NEXT_CONCEPT]
Yaya Toure has been voted the BBC African Footballer of the Year 2015.