A teenager was killed in a series of gas explosions that set off dozens of house fires in three Boston suburbs, and officials told affected residents early Friday morning that they could be out of their homes indefinitely.

Leonel Robson, 18, of Lawrence, Mass., was pronounced dead at Massachusetts General Hospital at 8:30 p.m. Thursday, after a chimney from a house explosion in Lawrence fell on the car he was in, the Essex County District Attorney's office said.

His was the only fatality in the gas explosions, which resulted in power cut to more than 8,000 homes in Lawrence, Andover and North Andover, Mass.

Another 25 people were hospitalized, most with minor injuries, officials said.

As many as 80 homes were burned or damaged, and there were three separate explosions, officials said.

Lawrence Mayor Dan Rivera said each house would have to be inspected to make sure the gas was shut off. Technicians, firefighters and police, in teams of three, planned to go door-to-door overnight, he said.

The spontaneous gas explosions and fires — which started at around 4:15 p.m. on Thursday — mystified officials. Massachusetts Gov. Charlie Baker said his state would work with the federal government to investigate what happened and who should be held accountable.

Baker also said investigators from the U.S. Department of Transportation's Pipeline and Hazardous Materials Safety Administration and the National Transportation Safety Board would look into whether there was a connection between the explosion and a notice sent earlier in the day to Columbia Gas utility customers, saying the company would be "updating natural gas lines."

The federal government's inquiry "would obviously include a review of that," he said.

Firefighters inspect a home after gas explosions on Sept. 13, 2018 in North Andover, Massachusetts. Adam Glanzman / Getty Images

Officials could not say when residents would be able to return to their homes. The cities have set up shelters where displaced residents can stay until authorities determine it is safe for them to go back, Baker said.

"It was just fire out of nowhere," said North Andover resident Juan Santiago, who smelled smoke a few doors down from his. "I was really, really edgy, nervous ... almost broke down in tears at a moment."

Lawrence General Hospital was treating 10 patients Thursday night for smoke inhalation to traumatic blast injuries, hospital officials said. One person was in critical condition and one was in serious condition.