ROCKLAND — One man remained at Maine Medical Center in Portland on Friday after he and two others were injured in a flash fire at a Wharf Street garage late Thursday.

The cause of the flash fire was grinding being done on an empty 50-gallon barrel of acetone. Vapors from the barrel were ignited by sparks from the grinding.

Joseph Dinapoli, who rents the garage, said he and some friends were working on his mud truck when the incident occurred shortly before 10 p.m.

Dinapoli said he and a woman friend were taken to Pen Bay Medical Center in Rockport and released after being treated for burns. His other friend was flown by LifeFlight helicopter to Maine Med with third-degree burns on his right arm and first-degree burns on his face and calves.

He said the family does not want the name of the injured man released but he is expected to be at Maine Med for a few more days.

The flash fire occurred at 9 Wharf St. The 1,800-square-foot garage is owned by 9 Wharf Street LLC, whose principal owner is Finlay Matheson of Miami. The garage is adjacent to carrageenan manufacturer Marine Colloids’ facilities.

When emergency crews arrived, they found multiple small debris fires burning inside a large metal-frame garage and used fire extinguishers to put out the flames, Fire Chief Chris Whytock said. There was light smoke coming from the building.

The State Fire Marshal’s Office was called to investigate, along with the Rockland fire and police departments because of the injuries.

The chief said the first thing to do in such an incident is to leave the building.

“With the size of the building, the fire load that was present, and the extent of injuries, early notification is paramount to everyone’s safety and well-being,” Whytock said.

Dinapoli said one of his friends called the fire department as soon as everyone was out of the building.