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".
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.
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!"
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
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.