Media playback is unsupported on your device Media caption Sebastian Barry dedicated the book to his son, but revealed his children do not read his literature

Sebastian Barry has become the first novelist to win the prestigious Costa Book of the Year prize twice.

Days Without End, a novel that begins in the 1850s, tells the story of two Irish soldiers who go to fight in US wars, including the civil war.

The Dublin-born author and playwright, 61, was inspired to write about the gay relationship at the heart of the story after his youngest son came out.

Barry, who receives £30,000, also won in 2008 with The Secret Scripture.

Prof Kate Williams, who chaired the judging panel, described the book as "a searing, magnificent and incredibly moving description of how the West was won".

'Crazy happy'

Accepting his latest prize on Tuesday evening, Barry said: "You nearly had the first instance of a posthumous winner, I got such a fright.

"On this occasion any of these amazing, amazing books could have won, leaving aside my own.

"I do want to thank the judges - you've made me crazy happy from the top of my head to my toes, in a way that is a little bit improper at 61."

Immediately after his win, Barry got in contact with his son Toby, to whom the book is dedicated, via Skype.

"I couldn't hear a word he was saying, but the glowing happy face of your son is an award in itself," he said.

Image copyright PA Image caption Author and historian Prof Kate Williams chaired the judging panel

He told the BBC: "As a father, I'm trying to mobilise the world to stop being in any way prejudiced to people who are gay... they should be revered and emulated rather than in any way made to feel unhappy."

He recalled how Toby, after reading the book, had said: "You're not gay dad, but you're an ally - and I like your book!"

'Blown away'

Prof Williams said the decision to award Barry's book the prize had been unanimous.

"We as judges were absolutely blown away by this book," she said. "It takes you from the highs to the lows of human experience."

She described the book's gay relationship as "one of the most wonderful depictions of love in fiction".

2016 COSTA CATEGORY AWARD WINNERS

Image copyright Reuters Image caption Francis Spufford, Keggie Carew, Sebastian Barry, Alice Oswald and Brian Conaghan with their books

Costa First Novel Award: Francis Spufford - Golden Hill (Faber & Faber)

Costa Novel Award: Sebastian Barry - Days Without End (Faber & Faber)

Costa Biography Award: Keggie Carew - Dadland (Chatto & Windus)

Costa Poetry Award: Alice Oswald - Falling Awake (Jonathan Cape Poetry)

Costa Children's Book Award: Brian Conaghan - The Bombs That Brought Us Together (Bloomsbury)

At the beginning of January, Barry's novel was named as one of five Costa category winners alongside the prizes for first novel, poetry, children's book and biography.

The overall winner was announced at an awards ceremony held at Quaglino's in central London.

The judging panel included TV presenter Graham Norton, journalist Sian Williams and actor Robert Bathurst.

The Costa prize honours outstanding books by authors based in the UK and Ireland and was previously known as the Whitbread award.

Last year's overall winner was children's book The Lie Tree by Frances Hardinge.