Most actors try to relate to their roles in one way or another. Not many, though, are actually related to their on-screen characters.

In Mrs Wilson, a three-part drama that screened earlier this year on the BBC and US public television’s Masterpiece strand, Ruth Wilson plays her own grandmother Alison, a woman searching for the real identity of her late husband (played by Iain Glen), a spy novelist employed by British intelligence during the Second World War who turned out to have had a secret personal life.

The tangled but true story, set in early 1960s London, first came to Wilson - now known for her performances in UK and US series such as Jane Eyre, Luther and The Affair - a decade ago, in the form of a memoir written by Alison Wilson and given to her grandchildren.

Gathering more detail from newly discovered relatives and a more recent book on her grandfather, Ruth Wilsonbegan discussions about putting the story on screen. To keep control of how the delicate story was told, she opted, for the first time in her career, to serve as an executive producer (alongside Ruth Kenley-Letts and Neil Blair for Snowed-In Productions, Lucy Richer for the BBC and Rebecca Eaton for Masterpiece; Jackie Larkin produces).

“I was really insistent,” Wilson recalls about her determination to be involved behind-the-scenes. “I wanted to make sure there was some family member keeping an eye on everything, and making sure the story was told in a way that we wanted it to be told.”

Alison Wilson’s journey in faith, for example, was an element “which I think many people were scared of dealing with because it’s so hard to put religion, or any kind of spirituality, on screen”, she says. “I felt the story couldn’t be told without that in.”

Playing the title role herself was not a necessity, Wilson insists. “But there was a point at which I thought, ‘I want to protect her in some way.’ Not by softening the edges and making her likeable - the opposite. I wanted to be able to delve into all the contradictions that existed within her. In her memoir she pitches herself as slightly more of a victim, and I felt there was something very interesting in her being complicit in this relationship.”

Taking part in the development of the project has opened new horizons for Wilson. The actress says she is now “more interested in creating my own work. I really enjoyed being in the room with the writer [Anna Symon], being there to witness the shaping of the story and then all the creative heads coming on board.

“As an actor you always feel slightly left out of the creative process,” she adds, “but as a producer you realise how many brilliant creative people are involved in putting something on screen. It was scary and stressful at moments, but I’d love to do more of it.”

Wilson’s growing reputation should provide plenty of opportunity. She will appear later this year in the first season of the high profile BBC/HBO series based on Philip Pullman’s His Dark Materials; she is currently doing a stint on Broadway in what she describes as a “crazy version” of King Lear, with Glenda Jackson in the title role; and she has just been confirmed to star in True Things About Me, director Harry Wootliff’s BBC Films feature, which she is also producing with Jude Law.

Wilson would like to do more film work, though she reports the big-screen roles she has been offered lately “haven’t been great”.

While she acknowledges more good roles for women are being written in the film world, “I do find it limited, and that’s why I’ve tended to be drawn more to theatre and TV, where the female roles are much more interesting and the journeys are better.”