Singer-actor Harry Styles will play a gay role in the upcoming film My Policeman.

According to The Sun, the former One Direction star will play Tom Burgess, a closeted gay man, in the film. David Dawson will play his love interest. The film also features out actor Rupert Everett. Emma Corrin (The Crown) will play Tom's wife.

A source close to the movie told the outlet that Styles “will be having sex on screen and they want it to look as real as possible.”

“The plan is to shoot two romps between Harry and David, then another scene where Harry is naked on his own. Not much is going to be left to the imagination.”

“Harry is throwing himself into this new role and is really excited about the challenge, even though it's a daunting task. He always wants to do things that people wouldn't expect and challenge what people think about him – and this film will really do that,” the source said.

The film is based on the novel by Bethan Roberts. My Policeman, the novel, is described as inspired by the life of British novelist E.M. Forster (A Room with a View), who had a long-term relationship with a married policeman.

Production on the film has started in London.