An explosion at a Marble Hill high school campus that blew out the walls of the sixth floor and injured three people was caused by a worker who lit a match to test a gas valve, authorities said Friday. 

The worker was testing the valve in a science lab after a new gas line had been installed, the mayor's office said in an update on the explosion that rattled the Bronx neighborhood and sent debris flying as far as 200 feet. Nearly 140 firefighters responded to the explosion that was first called in around 8:09 p.m.Thursday. 

Three construction workers were seriously injured with burns, and are being treated at Jacobi Medical Center in the Bronx, Mayor Bill de Blasio said after traveling to the school on Thursday night. 

The campus is home to seven schools and about 3,000 students. Two programs that were operating at the school are expected to be relocated and will open Monday. 

The Department of Buildings was checking the school's structural integrity to determine whether the students who attend the schools in the building can start the autumn semester at their campus or will have to be relocated.

Several months ago, the School Construction Authority hired a private contractor to improve the school's sixth floor science laboratory, which has gas burners, officials said.