“How to Train Your Dragon 2” has outed its first gay character. The animated film sequel, which premiered at the Cannes Film Festival on Thursday, revealed that an old, returning character is actually gay, but it has done so in the most subtle way.

Seasoned Viking warrior Gobber the Belch was not meant to be outed as gay, but his voice actor, the titular host of “The Late Late Show with Craig Ferguson,” had a surprise in mind.

In the film, Gobber is watching a husband and wife arguing when he says, “That is why I never married.”

Ferguson then added a line that wasn’t in the script: “That, and one other reason.”

He doesn’t say anything more, not needing to explain further what he means by that. However, viewers quickly caught on the seemingly reference to gay marriage.

Director and writer Dean DeBlois said that the line wasn’t deliberate.

“And we all started chuckling and said that’s right, Gobber’s coming out in this movie,” the filmmaker told Fox411.

“I just love that about Craig. He’s always got just a little extra something for you. I think it’s nice. It’s progressive, it’s honest, and it feels good, so we wanted to keep it.”

Thanks to Ferguson’s initiative, Gobber is now officially gay. Dubois said that the character’s homosexuality will be written into the third film, which the director has just started outlining.

“It does make for an interesting revelation because now, what does that mean, do we shed a little more light on Gobber’s love life?”

The film’s star, Jay Baruchel, who voices Hiccup Haddock III, thought that the inclusion of the gay reference is a good thing for a children’s movie.

“There’s a little – I think it’s open to interpretation,” he told FOX311. “Preaching tolerance in any respect is never a bad thing. I don’t know if drawing a massive amount of attention in the middle of a kid’s movie is, like, necessarily what you should be doing, but listen, if somebody catches it, then good for them.”

“How to Train Your Dragon 2” is the sequel to the box office hit DreamWorks film in 2010. It brings back stars who voiced characters in the first film, including Ferguson, Baruchel, America Ferrera, Jonah Hill, Christopher Mintz-Plasse, T.J. Miller, Kristen Wiig, and Gerard Butler. Cate Blanchett also stars, voicing a new character, Valka.

It will be released to international theatres on June 13.