An office junior spent two days in intensive care after filing racks crashed down on top of him at work, leaving him unable to breathe, a court heard.

Lee Oxley, 18, was lucky to escape serious injury after the accident at Bradford solicitors Kenningham, Underwood and Armstrong, magistrates were told.

Halifax Magistrates heard how Mr Oxley had been dancing around to a radio as he worked in a darkened file room of the Ivegate solicitors' firm.

But the movement caused the shelves to topple on top of him, trapping him beneath 512 stones of clients' files.

Yesterday Ian Underwood, senior partner at the firm, was fined £5,000 and ordered to pay £5,547 costs after pleading guilty to four counts of breaching health and safety regulations. These related to inadequate lighting, racking and provision of health and safety training.

The company now faces being sued by Mr Oxley, of Barkerend, in the civil courts, the court heard.

Alaric Dalziel, prosecuting on behalf of the Health and Safety Executive, told the court Mr Oxley had been lucky to survive the incident last April.

He suffered bruising around the windpipe and passed out through suffocation.

"It was the duty of the defendant to meet the safety regulations and this shows how important they are when businesses take on young people," said Mr Dalziel.

He added Mr Oxley had been given a torch and asked to find a number of files in a room that had no other artificial lighting.

"The whole structure was unsuitable. It was an amateur, inadequate construction," he said, adding the room had had no electricity for 15 years.

In mitigation, Julian Goose said Mr Oxley and a friend had taken a radio in to the room with them.

"He danced to the music and shook the stack of shelving," he said.

"If it wasn't for his ridiculous behaviour this wouldn't have happened."

A window allowed a small amount of natural light into the room and no one was allowed in after dark.

The business was respectable and the defendant of impeccable character, said Mr Goose, adding that after the accident the company had spent more than £20,000 on safety improvements.

He said the stacking was erected in 1977 and that over the years had become inadequate for the weight it was holding.