More than 150 firefighters fought the blaze as it burned through 3,000 acres (1,200ha) of bushland near the city on Sunday, authorities said.
The fire prompted clouds of smoke and ash, with many locals posting photos on social media.
Officials said the fire was being treated as suspicious, but nobody was hurt.
Perth woman Geraldine McGregor, 34, said she witnessed “vivid orange skies” in the city’s centre.
“When I saw the smoke quickly fill the sky with that colour, I was worried, because I knew it could only mean a massive bushfire somewhere,” she told the BBC.
Others posted photos of the sky darkening across suburbs, and said ash was falling.
Drivers were warned to drive carefully in the conditions. The smoke could even be seen from planes.
Residents were warned that the fire posed a risk to lives and homes, but the threat was later downgraded when wind conditions changed.
Authorities were also fighting a bushfire in New South Wales on Monday.
Australia experienced one of its driest winters on record in 2017, heightening the fire danger for the summer season. (Courtesy BBC)