Gov. Charlie Baker said state and local authorities are investigating but that it could take days or weeks before they turn up answers.

“This is still very much an active scene,” he said. “There will be plenty of time later tonight, tomorrow morning and into the next day to do some of the work around determining exactly what happened and why.”

Earlier, Andover officials said in a statement that all 35 fires in the town have been extinguished.

The Lawrence mayor's office has confirmed that these explosions and the subsequent fires were caused by over-pressurized gas valves.

>> Read more trending news

Columbia Gas had announced earlier Thursday that it would be upgrading gas lines in neighborhoods across the state, including the area in which the explosions happened. It was not clear whether work was happening there Thursday, and a spokeswoman did not immediately comment.

The Boston office of the FBI has reported that there are no indications that this incident is related to terrorism.

The Massachusetts Emergency Management Agency said staff members, along with state fire investigators, were heading to Lawrence, Andover and North Andover.

Crews respond to suspected gas explosions that have damaged homes in communities north of Boston (WFXT.com)

The three communities house more than 146,000 residents about 26 miles north of Boston, near the New Hampshire border. Lawrence, the largest of them, is a majority Latino city with a population of about 80,000.

The Associated Press contributed to this report.