The intense pressure of refereeing the 2015 Rugby World Cup final was nothing compared to the struggle to accept that he was gay, according to Nigel Owens.

The rugby union referee told BBC Radio 4's Desert Island Discs that he attempted suicide, and was just 20 minutes from death. Following this, he came out publicly in 2007 after realising he could not live a lie.

Speaking about his suicide attempt, he told Desert Island Discs presenter Kirsty Young: “I cried that night and realised, 'I need to grow up'.

“Refereeing that World Cup final between Australia and New Zealand in front of 85,000 people and the millions of people watching at home, scrutinising every single decision you make under a huge amount of pressure, was nothing compared to the challenge of accepting who I was. Accepting who I was then, saved my life.”

Owens, 45, was born and raised in the close-knit village of Mynyddcerrig in Carmarthenshire, Wales, but realising he was gay felt “totally alien” to him.

He said he “would have done anything to be 'normal' in people's eyes”. Owens also revealed his health struggles. He tried to lose weight and became bulimic; at another point, in an attempt to gain weight, he started going to the gym, then became hooked on steroids. He also described going to a doctor and saying: “l do not want to be gay. Can I get chemically castrated?”

Owens eventually came out, at the age of 34, to his mother Mair. She had already guessed his secret. He told Desert Island Discs: “I was brought up to be honest, and here I was lying to the most important person in my life. It was affecting my life.

“Unless you are happy with who you are, you cannot excel and be the best you can be at whatever you are doing. You cannot enjoy life if you are not happy within yourself.”

He said his father, Geraint, found the idea of having a gay son “difficult at first”, but added: “My love for him and his love for me has not changed one bit.”

Coming out helped to turn around his stalling career as a rugby union official. His tough reputation saw him picked for the World Cup final and he went on to dedicate his appearance to his mother Mair, who died of cancer six years earlier. There has also been huge support from the Welsh Rugby Union.

Owens said he had been suffering from bulimia until “not that long ago” but the shock of seeing his mother in tears as she told him she was dying of cancer forced him to stop.

He said: “Here I am, healthy but making myself ill and suffering from bulimia when my mum and millions of other people across the world are fighting every day just for an extra few hours with their loved ones - that is when the bulimia stopped and, touch wood, I haven't suffered since then.”

l do not want to be gay. Can I get chemically castrated? Nigel Owens' words to a doctor

He spent around 180 days away from home last year with work. Despite having a “lovely” partner and lots of relatives, he is not convinced he will ever become a father.

He worries because he is lonely sometimes, but feels he has been given a “second chance” filled with happy family memories. These include being honoured with an MBE at Buckingham Palace.