Firefighters from several towns fought a brush fire along half a mile of railroad tracks in Scarborough near Highland Avenue on Friday afternoon.

Reports of the fire began coming in around 3 p.m., according to Scarborough Fire Chief Glen Deering.

Driven by high winds, the flames burned through areas near homes, threatening several buildings but damaging none of them, he said.

Most of the fire was contained by 4 p.m., although firefighters remained at the scene to extinguish hot spots.

Bob Montanari, who lives at 40 Highland Ave., said he was leaf-blowing around 3 p.m. when he saw a train, possibly an Amtrak passenger train, pass by on the tracks behind his home. He said he saw sparks and the next thing he knew, he saw smoke.

“At first I thought someone was working on the tracks,” Montanari said. Then the wind picked up and the flames grew to 6 to 8 feet high.

“I just thought it had to be dealt with,” Montanari said, and he called 911.

Fire companies from South Portland, Cape Elizabeth and Biddeford helped fight the fire.