Firefighters fighting a blaze in Perth's hills are bracing for strong winds which could put containment lines at risk.

The fire started in Glen Forrest near Mundaring just after 2:00pm, and was threatening lives and homes.

The incident controller Allan Riley says it is neither controlled or contained.

"We're expecting the easterly winds to pick up so we're making sure we consolidate the lines around the fire, make sure it's not going to spread," he said.

"Wouldn't say it's under control, the fire behaviour has stopped because the wind has stopped but we are expecting that to pick up so wouldn't call it contained or controlled yet."

Mr Riley says a lot of resources have been thrown at the fire.

"We've got 100 firefighters, career and volunteer, on the ground and we've had all of the air resources in the metro area attacking this area," he said.

"They've now withdrawn now but we've still got them on standby in case we need them."

Water bombing helicopters flew close to fire fronts which threatened houses in Newric Road, Glen Forrest Drive and Jellicoe Road.

The blaze forced the Glen Forrest primary school into lockdown.

The school has 300 students and police escorted a number of those to a nearby muster point.

The school says they were not under threat but parents were not able to collect them because of road closures.

Residents in the area are being urged to remain alert, and be prepared to leave their homes or to actively defend them.

Firefighters say 20 hectares has been burnt and a south-easterly breeze is fanning the blaze.

There were reports of 20 metre high flames and at one point, a thick plume of black smoke from the fire could be seen from Perth, 30 kilometres from Glen Forrest.

The cause of the fire will be investigated.