SANFORD — A fire in a building at Pleasant River Lumber Company was quickly extinguished Thursday morning after being contained by workers at the company until firefighters arrived.

The fire in Building 5 at the sprawling lumberyard at 563 New Dam Road started in the wall of the building near some machinery around 9:28 a.m., setting off a sprinkler system inside and sounding a fire alarm.

Sanford Fire Capt. Brian Smith said that lumber company employees saw flames climbing the wall at the side of the building and used a hose and fire extinguishers to keep it from spreading. When firefighters arrived shortly afterward, they tore part of the wall out to get at the source of the fire.

“You get a big concern when you hear a lumber company with a fire,” Smith said.

Smith credited employees for their fast action. Firefighters cleared the scene shortly after 10 a.m.