A gifted student told his dad he loved him moments before he was electrocuted on a railway line.

Witnesses told an inquest that Hurstpierpoint College pupil Sam Griffiths stripped down to his boxershorts and ran across the live track as part of a New Year’s prank.

But on the third crossing at Burgess Hill Station the 16-year-old slipped and received a fatal electric shock.

The teenager had spent the evening celebrating at a friend's house before later telephoning his father, Ian Griffiths, at about 12.30am on New Year's Day.

Mr Griffiths told the inquest at Haywards Heath Magistrates' Court: “It was clear that he was at one with himself. He said, 'Dad, I love you' and I said, 'Sam, I love you. Take care'. Those were my last words to him.”

The inquest was told that toxicology tests on Sam, a pupil at independent Hurstpierpoint College, showed he was about twice the legal drink-drive limit. In a statement, pathologist Dr Peter Wilkins said no other drugs were detected in his system.

Friends said Sam did not appear to be intoxicated at the party, which was attended by 22 guests, and appeared to be having fun.

Victoria Henley, who hosted the party along with her husband, said: “It was a very calm, happy party and at midnight we all had the traditional get-together.”

Later, a group of five friends, including Sam, decided to leave after midnight to go to a friend's house and they arrived at Burgess Hill station to catch a train.

One of the friends, a 16-year-old girl, said Sam decided to venture across the live railway tracks as a prank, telling them: “Oh, I've always wanted to run across.”

He ran across the tracks twice before stripping off his shirt, trousers and shoes, leaving him dressed in just his boxer shorts.

But on the third occasion, witnesses said he slipped and fell on the live line, causing him fatal injuries.

Recording a verdict of misadventure, West Sussex Coroner Penelope Schofield said she would write to British Transport Police (BTP) outlining her concerns about public awareness of live rails.

She said she hoped that publicity surrounding the case would help to highlight the dangers of live rails after hearing some young witnesses were unaware whether electricity was running through the rails at the time.

Turning to Sam's parents, Ian and Christiane, Ms Schofield said: “All the people we have heard from said he was very popular and loving and as you have made clear, you were extremely proud of him.”

Following the case, Sam's parents and sister Kate issued a statement which said: “Our lives have been greatly enriched by Sam and, as his family, we want to find a way to move forward that pays tribute to his kind and loving nature and his spirit of fun and adventure.”

Sam's headmaster Tim Manly said he would be greatly missed by the school community.