Firefighters have gained the upper hand on a wind-driven wildfire that destroyed 40 homes, burned nearly 11 square miles and forced about 150 people to leave two small California towns at the eastern base of the Sierra Nevada.

The fire started near a highway on the border of Inyo and Mono counties Friday afternoon. It blew up when 50 to 75 mph winds whipped through wooded areas near Swall Meadows and the neighboring community of Paradise for about three hours, California Department of Forestry and Fire Protection Capt. Liz Brown said.

An incoming storm caused the winds to constantly shift direction, making it tough for firefighters to contain the blaze, she said Saturday.

"We had to take defensive positions to protect as many structures as we could while protecting ourselves," Brown said. "We did what we could."

She said Swall Meadows was hit hard by the blaze -- 39 homes were destroyed there while one burned in the community of Paradise.

Firefighters made progress after rain moved in, and have contained 50 percent of the blaze.

But Brown said the rain hasn't been enough to completely put out the fire. A three-year drought across California has created extremely dry timber brush that has fueled the flames, she said.

The cause of the fire was under investigation.