Neil Patrick Harris says the key to his lasting romance with husband David Burtka - whom he has been dating for 15 years, and married to for five - is "perseverance". Picture: AP

Neil Patrick Harris says the key to his lasting romance with husband David Burtka - whom he has been dating for 15 years, and married to for five - is "perseverance".

The How I Met Your Mother star has been in a relationship with his husband David Burtka - with whom he has eight-year-old twins Harper and Gideon - for 15 years and married for almost five, and has now said the secret to their longstanding love is their ability to keep pushing through all their ups and downs.

Speaking to Entertainment Tonight, he said: "I think the secret to a relationship is just perseverance, you know? It's not always pretty ... but he's pretty, so it makes it easy." 

Neil's comments come after he recently took to Instagram to gush over his spouse, whom he went on his first date with in April 2004, 15 years ago.

The 45-year-old actor wrote alongside a picture of himself and David at a geothermal spa in Iceland: "My first date with David was 15 years ago today, and we've been nearly inseparable ever since. I'm so, so grateful to this gorgeous man for giving me his heart, his shoulder, his strength, his lust, his laughter, his joy. 

"He's an actor, chef, author, singer, producer, and the most wonderful, selfless parent I've ever seen. A sextuple threat, if you will. And I most certainly will. Happy 15th Anniversary, @dbelicious. You keep making all my dreams come true. #love (sic)"

And David, 43, shared a sweet message of his own as he reflected on the first time they met.

He wrote on social media: "Fifteen years ago Neil Patrick Harris and I met on the street. From that day he has made my world a better place.

"Thank you @nph for the best years of my life. I can't believe how fast 15 years have gone. Happy Anniversary! I can't wait to keep on laughing, playing and loving for years to come. #15yearchallenge #lifeisaparty (sic)"