Lena Waithe will voice the first openly gay character in an animated Disney film.

The US writer and actress stars alongside Tom Holland and Chris Pratt in animated fantasy adventure Onward.

Waithe, who recently separated from her wife, lends her voice to an LGBT cyclops police officer named Officer Specter.

View this post on Instagram

🌈

A post shared by Lena Waithe (@lenawaithe) on

It is the first openly gay character in an animated Disney or Pixar film. Onward is set in a fantasy world filled with mystical creatures and magic.

Holland and Pratt voice elves and the plot revolves around their attempts to resurrect their late father for 24 hours.

Waithe’s cyclops makes a brief appearance in the film, after pulling over the two main characters.

She mentions her girlfriend before letting Holland and Pratt move on. Disney has previously hinted at same-sex couples in its animated films, but never confirmed their presence.

In 2016’s Finding Dory, two women are seen pushing a pram. When asked if they were lesbians, director Andrew Stanton said: “They can be whatever you want them to be.”

And last year fans thought they spotted a same-sex couple in Toy Story 4 when two women drop a young girl at school. Again, filmmakers refused to confirm if they were gay.