A boy of 16 accused of causing damage costing £3 million by torching a school confessed to friends minutes after starting the fire, a court heard.

He is alleged to have broken into Tideway School in Newhaven and set fire to a bundle of papers before stealing a can of coke, some biscuits and a sachet of soup.

Lewes Crown Court heard how alarms were activated and firefighters battled the blaze for hours.

The school was closed for two weeks following the fire, which broke out at about midnight on April 4.

John Fairhead, prosecuting, said: "At various times during the day of the fire the defendant discussed committing burglary that night at Tideway School."

One of his friends told the court that as they were standing outside Roy's Liquor Store he had been discussing breaking into the school to steal money.

Later the boy, who cannot be named for legal reasons, was hanging around in a group of five youngsters near Tideway School, said Mr Fairhead.

Two of the group went home but the other three entered the school site through a gap in the fence at about 11.45pm.

A 15-year-old witness told the court the accused boy said: "Why don't we go up to the school and see if there's any money?"

Mr Fairhead said: "The defendant forced his way into the staff room while the other two waited outside.

"They saw the defendant walking slowly across the staff room holding his lighter up as if using it for a torch."

They then saw the defendant set light to some papers before they panicked and ran away.

Mr Fairhead added: "A short time later the defendant rejoined them and had with him items that had clearly come from the staff room.

"One of the boys received a mobile phone call and the defendant said to the person on the phone I have just set a fire in the school.'

"He told at least two people that he had set fire to some papers in the staff room the next day.

"He said to one I did not mean it to go that big'."

The boy, from Newhaven, denies arson and burglary. The hearing continues.