A spokesman for Hampshire Fire and Rescue Service confirmed that three crews from Rushmoor Fire Station were called to Fernhill School and Language College shortly before 11am.
He said a small fire had broken out in toilets at the secondary school in Neville Duke Road, which had to be evacuated.
Firefighters tackled the flames using breathing gear, before bringing in special fans to clear smoke from the building.
They were on the scene until around 11.50am.
The spokesman said five teenage girls were treated at the scene for the effects of smoke inhalation.
He added that three people had been taken to Frimley Park Hospital.
A spokesman for South East Coast Ambulance Service confirmed that it received an emergency call regarding the fire at the school at around 11am.
The service sent one ambulance and two quick response paramedics’ cars to the scene.
He confirmed that three people were taken to Frimley Park Hospital and that they included two teenage girls.
A spokesman for Hampshire Constabulary confirmed officers had been called to the school but would only add that the fire service had taken the lead in the operation.
The News & Mail has tried to contact Fernhill School for more information but has yet to receive a response.