Two brothers have admitted setting fire to a school in Blackpool causing £7m worth of damage.
The school had only just been refurbished after a flood
On Thursday the boys, aged 10 and 12, pleaded guilty to torching Devonshire Road School in August this year.
More than 50 firefighters tackled the fire which caused extensive damage, destroying two halls, a new library and nine classrooms.
At the town's youth court, the boys also pleaded guilty to breaking into the school in Layton and stealing property on Saturday 23 August, the day the fire broke out.
Magistrates were told the fire was first discovered by a passing motorist, who saw smoke billowing from the school, which had only just re-opened after being refurbished following a flood.
It led to more than 400 pupils being re-located to the Boundary School, which is two miles away, an operation that to date has cost at least £300,000, the court heard.
The court was told it would cost £7m to restore the Devonshire Road school back to its original Victorian state.
Prosecutor Suzanne Sanders told the court: "Fire appliances from all over Lancashire attended.
"The upper and lower halls, the new library and nine classrooms were destroyed.
"Six classrooms and the corridors were damaged by smoke and water."
She said an alternative plan to demolish the school and re-build it would cost between £4 and £5m.
Hugh Pond, defending, said his clients - who have no previous convictions - "pleaded guilty at the first opportunity".
Magistrates adjourned the case and the boys will be sentenced at a later date.