WALDOBORO — A propane leak inside a Waldoboro house Thursday night caused the explosion and fire that badly injured two Massachusetts men, the State Fire Marshal’s Office says.

Robert Keefe, 59, and his 28-year-old son, Ryan Keefe, both of Dracut, were being treated at Maine Medical Center in Portland for serious burns on Friday.

The two were at the house on Dutch Neck Road to open it up for the summer for its owner.

Fire investigators say the two men were in the basement of the house when they turned on the dryer and the explosion took place. The force knocked the house off its foundation and the men escaped through a basement window​.

The resulting fire burned the house to the ground.

The Waldoboro Fire Department and departments from three additional towns responded to the explosion at 1838 Dutch Neck Road about 8:30 p.m.

When he arrived, Fire Chief Paul Smeltzer discovered the residence in flames and the Keefes, both severly burned, outside, the department said in a statement.

Due to the severity of the explosion and the extensive fire damage, the home was completely destroyed.

The home was owned by Robin Pancygrau of Chelmsford, Massachusetts. She was not at the Waldoboro residence at the time of the explosion.