Neil Patrick
Neil Patrick Harris is married to David Burtka Getty

Hollywood actor Neil Patrick Harris has revealed he realised he was gay after a friendly kiss from Burt Reynolds.

The How I Met Your Mother star, who came out in 2006, got his Happily Ever After in September when he tied the knot with long time partner David Burtka in Italy.

In his new memoir, Choose Your Own Autobiography, Harris reveals that for years he struggled to come to terms with his sexuality, choosing to instead to tell people he was bisexual.

"After a long internal journey, you now embrace being gay, recognising it as a wonderful and integrally important component part of the totality that is you," he writes.

"You are full yourself'".

Recalling the moment Reynolds kissed him on the set of 1980s drama BL Stryker, he says it was then he finally accepted who he was.

"As a joke at the end of one take, Burt leans over and kisses you square on the mouth," an extract from the book reads.

"The crew thinks this is very funny, but it makes you uncomfortable. Uncomfortable and, it will ultimately turn out, gay. Burt Reynolds' kiss makes you gay."

In 2006, the father-of-two, took the bold step to confirm years of speculation.

"I am happy to dispel any rumours or misconceptions and am quite proud to say that I am a very content gay man living my life to the fullest and feel most fortunate to be working with wonderful people in the business I love," he said in a statement.

Harris' revelation comes just months after he admitted regularly sleeping with women as a confused teenager because it seemed like the cool thing to do.

He said: "In high school all my friends were sleeping with girls and it just seemed like that's what one did."