The mayor says John F. Kennedy High School in Marble Hill will not open in time for the school year after an explosion there Thursday night.

In a phone interview with NY1, Mayor de Blasio said 4,000 students will be relocated to nearby buildings.

He says many of those details are still being worked on, and it's not clear when the building will be open again.

Three classrooms were destroyed, and the 6th floor of the 8-story building was heavily damaged.

De Blasio says an investigation by the fire marshals suggests one of the workers lit a match to test a newly-installed gas line.

"This appears to have been a mistake and one that cost a huge amount to many people," he said. "The workers working for a contractor for the city for the school construction authority company that we had a good history with, so this is certainly a very surprising incident."

Three construction workers suffered burns in the blast.

The mayor says one is critical and two are in serious condition.

A neighbor said the explosion was so powerful, it shattered the windows in his building.

JFK High School, now called Kennedy Campus, houses eight schools.

The school year is scheduled to start September 9.