SOUTH PORTLAND — Quick thinking by a homeowner whose house had been struck by lightning tonight most likely prevented a fire from spreading to other parts of the structure.

Lt. Lou Cavallaro said fire broke out in a clothes dryer and wall at 24 Noyes St. shortly after 7 p.m. after lightning hit a metallic fence and entered the basement area.

The home’s owner, Elliott Randall, grabbed a fire extinguisher which he used to put the fire out.

Cavallaro said the lightning strike also split a natural gas line that had the potential to accelerate the fire. Firefighters shut the gas off.

“We were very lucky,” he said.