A talented medical student killed himself after being thrown out of his lectures when a social media post about a fling with a fellow student went viral.

Edward Senior, 22, went onto a private message forum to tell close friends about his encounter with an attractive female student.

But his friends decided to share the post with hundreds of other students as a joke, including the young woman mentioned.

An inquest into his death today heard Mr Senior, also known as Ted, feared his dreams of being a doctor were over after being disciplined by university chiefs.

He returned back to his family home in Monmouthshire, south Wales in a state of distress and was found hanged in a nearby wood soon after.

Swansea medical student and keen rugby player Edward Senior, 22 (pictured) hanged himself after a social media prank went tragically wrong

His mother Diana told the hearing at Newport Coroner's Court: 'There was a complaint in relation to a post on social media.

'This resulted in Ted being excluded from the majority of his lectures and from a charity event he had organised. It had a profound effect on him and he came home.'

Mrs Senior said Ted seemed 'preoccupied' and left the family's £600,000 converted farmhouse on February 10 after saying he was having a day off from studying.

Mrs Senior told the coroner her husband Paul searched the grounds of their home and found their son hanging from a tree.

The inquest heard Mr Senior desperately tried to save him before paramedics arrived at the scene in Raglan, near Monmouth, south Wales.

A note was found in the Swansea University student's bedroom saying he intended to take his own life.

Gwent Coroner Wendy James said: 'Ted's decision highlights the risk of posting on social media sites.

'He made a post on a private forum and that post was shared by his friends.

'A decision was taken to exclude him from lectures and a charity event he was organising.

'He became isolated from his friends and fellow students and felt that his future as a doctor was in jeopardy.'

He (pictured on holiday in Africa) returned distraught to his family home in Wales where he was found hanged in woodland

The coroner said Mr Senior became 'overwhelmed' by a mistake.

She continued: 'Mistakes are part of growing up and can be attributed to the nativity of youth.

'But the biggest mistake Ted made was to dwell on this too much.

'I am sure he would have gone on to be a marvellous doctor and a credit to his family, friends and Swansea University.'

Mr Senior's mother sobbed as the coroner concluded: 'Ted's death was needless - he had a glittering future ahead of him.'

The inquest heard the bright student left school with 10 GCSEs and four A Levels before getting a 2.1 degree in physiology at Bristol University.

He started a post graduate degree course in medicine at Swansea last September, five months before he died.

An inquest into Mr Senior's death (pictured on holiday) opened in Wales today

The hearing was told an untouched bottle of morphine was also found close to his body in woods in secluded woodland at the family home.

PC Chris Butt told the hearing that a police investigation found there were no suspicious circumstances surrounding his death.

Mr Senior's family has set up a foundation in his name to help other young people contemplating ending their lives.

A GoFundMe page, originally set up to raise thousands for his funeral, read: 'In honour of Ted, it is the family's wish to set up a foundation in his name.

'This will be an organic process with funds raised being invested in projects and forums aimed at preventing a reccurance of a similar tragedy.'

The Ted Senior Foundation fund has reached almost £20,000 - four times its original target.

Tributes were paid to the 'blond-haired charmer', who was very good at rugby, cricket and football at the time of his death.

Edward Senior was a postgraduate medical student at Swansea University in Wales (pictured)

His brother Max said: 'Ted achieved a huge amount in such a small space of time.

'He was a talented rugby player and had a great passion for all sports.

'He got into medical school after years of hard work and sacrifice.

'Ted had a rare ability to light up any room with his wide smile, mop of blonde hair and special charm.

'Ted was a friend to everyone and always did his upmost to help people in need.

'He embodied all the right values on how to live, and will undoubtedly leave a lifelong legacy in everyone's hearts.'

A Swansea University spokesman said at the time of his death: 'We were very saddened to hear of the death of Edward Senior, a student at our Medical School.

'Our thoughts and sympathies are with his family and friends at this time.'

Mr and Mrs Senior, who run a boutique farmhouse B&B in Raglan, were too upset to comment after the inquest.

For confidential support in the UK, call the Samaritans on 116123 or visit a local Samaritans branch, see samaritans.org for details.