The actress Natalie Dormer has defended her new thriller following criticism of its female nudity and unsettling erotic content.

Dormer, who stars in and co-wrote the suspenseful In Darkness, released in Britain this weekend, said she had been surprised by critical reaction to a sex scene between the romantic leads and a shower sequence.

A critic on the renowned American film website, rogerebert.com, wrote of his discomfort with the film’s “sadistic relish”, while admiring some of its direction, and a review in the industry magazine the Hollywood Reporter detected “gratuitous nudity”. It might have upset some audiences, Dormer argues, but it was creatively necessary and did not undermine her feminist approach to her work. “Of course, you learn. When you make something, you learn that no matter how pure your intentions other people will see things in it,” said Dormer, 36, who is best known for playing the sexually manipulative Margaery Tyrell in Game of Thrones.

“There has to be sexuality in the power play of a thriller. We have all got bodies, after all. In this film the sex scene, which for me was a love-making scene, is a metaphor for the way my character connects with the part played by [fellow Game of Thrones actor] Ed Skrein. Nakedness is a good equaliser and the shower scene also shows the tattoos on my character’s body and makes it clear she is not quite who you think.”

In Darkness, which Dormer wrote with her Irish partner Anthony Byrne, who also directs, is set in London, with the plot revolving around the death of a mysterious woman, which is overheard by a blind musician, Sofia, who lives in the apartment below.

It gradually becomes apparent that Sofia, played by Dormer, is not as vulnerable as she seems. Byrne and Dormer were inspired by their love of film noir of the 1940s and by the tense psychological thrillers of the 1970s. Copying this template, Dormer argued, led inevitably to the erotic content of the story.

“If the lead characters do not have a clear connection, then it doesn’t work,” she said. “And on screen it has to be a physical connection between two broken people. That was my intention. In a thriller the protagonists always have to join together somehow and sex represents that connection. If you are being true to the genre, you have to show this.”

The unorthodox touch in this film, she argued, was that her transgressive heroine is never punished, as she would have been back in the heyday of Hollywood.

Dormer, who is to appear on television this week in the BBC’s serialisation of the novel Picnic at Hanging Rock, an Australian co-production which begins on Wednesday, said she had also had to revise her view of sexism in screenwriting. “I wanted to make this film because of the lack of rounded, flawed female characters in films. But when Anthony and I started writing I had a kind of epiphany about how hard it is to make the love interest, in this case the man played by Ed [Skrein], into a developed, 3D character.

When Skrein came to read the part the co-writers realised he had to be more than just a foil for Dormer’s lead role. “We both saw the problem and I understood how hard it is when you are writing from the other point of view. You don’t want them to become just a plot device. So I thought, ‘Oh, all these male white heterosexual writers have not necessarily been conspiring against women, it is just they are so obsessed with the main character, that they can’t help it’.”

Dormer said she was first drawn to Byrne, whom she met while filming The Tudors in Dublin, because of “his enlightened feminism”. “He likes writing for female protagonists, so it wasn’t so much that I was providing the female voice in the process. We were both trying to write human beings.”

While editing his 2007 comedy How About You?, Byrne, who has also directed the television hits Peaky Blinders and Ripper Street, lived temporarily in a serviced apartment and became aware of a woman moving about in the flat above him each evening, although they never met. He drew on the memory later, but could not find anyone to help him write the thriller he planned.

“I was not bankable then,” said Dormer, “because I had not done Game of Thrones or Hunger Games, but I had done many hours of script-reading. I also felt, as I still do, there were not enough complex roles for women to play. We need more female anti-heroes out there.”