Firefighters averted a chemical disaster after a school swimming pool complex was engulfed by 50ft flames on Friday night.

Just three metres away from the enormous blaze at the City of London Freemen's School, in Ashtead Park, there was a store containing gas cylinders and thousands of litres of a dangerous chemical used in the pool.

Firefighters used foam to cover the store, which contained sodium hypochlorite, preventing further damage to the school and people living nearby.

A fire investigation team is still looking into the cause of the blaze, which may have been an arson attack, according to a spokeswoman from Surrey Fire and Rescue.

Epsom crew commander Adam Love said if the chemical store had caught fire then people would have been evacuated from the surrounding area.

Mr Love said "It was lucky the wind was blowing away from the building into the field. The whole swimming pool building was fully on fire. We knew we were not going to be able to save it."

This Is Local London:

On the way to the fire at about 10.30pm, Mr Love said they checked plans for the school and discovered where the chemicals were stored.

He said: "The only information we had on water supply was the swimming pool but that was on fire. The other hydrant was on the main road.

"We didn’t have enough people and hose reels to put the fire out. It was lost anyway.

“All we did is protect the rest of the buildings. We covered them in foam to protect the buildings."

Mr Love was on one of Epsom’s two fire engines, which arrived on the scene first, and they were later joined by six more fire engines. In total about 45 firefighters were called to fight the fire.

This Is Local London:

He said: "One minute no-one is there, the next minute everyone is there. We left after four hours and there was one fire engine left."

Mr Love said he had two teams in breathing apparatus working in dark, windy and hot conditions to protect the store with chemicals.

The building housing the swimming pool collapsed during the blaze. In a worst case scenario, without Epsom’s fire engines, Mr Love said the school could have been lost.

A public consultation is under way over whether to relocate one of Epsom’s fire engines to Banstead or Burgh Heath.

This Is Local London:

Headmaster Philip MacDonald said: “I am very grateful to the staff on site who raised the alarm and assisted Surrey Fire Service in dealing with the fire. 

"I am also grateful to Surrey Fire Service and the police for their prompt and effective response to this emergency.”

This Is Local London: