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.
Firefighters in Chile say they have managed to control a huge forest fire around the port cities of Valparaiso and Vina del Mar.