The cause of a fire that burned a 39-foot pleasure boat Sunday was a mechanical issue related to refueling, authorities said Tuesday.

The fire ignited at 12:40 p.m., destroying the Sea Ray Sundancer powerboat shortly after it had been refueled, according to a Coast Guard statement quoting members of the Maine Marine Patrol. The Marine Patrol has closed its investigation.

Four people and a dog were on board the boat when the fire broke out. Nearby boaters helped them escape. No one was hurt in the incident off Portland Head Light in Cape Elizabeth.

On board were the owner, Daniel Mills of Portland and his wife Lauren Mills and two guests, Steve Hemkens, of Arlington, Vt., and Andrew McClelland of Portland.