The first season of The Fall is drawing to a close – the final episode airs on Monday night. I first pitched the idea in 2009. In the time since then that I've been working on the drama there seems to have been a torrent of stories about sex crimes. From high-profile celebrity arrests to the recent convictions of Mark Bridger and Stuart Hazell, the news seems to have been full of stories of the harassment, confinement, rape and murder of females by men.

I had already conceived the character of my serial killer, Paul Spector, when Russell Williams was arrested in Canada in February 2010. Williams was unusual in that he was a decorated pilot in the Canadian military. Until his arrest he had no previous convictions, but in fact had a long career of breaking and entering and stealing underwear. Somehow that escalated to killing, and he was ultimately convicted of first-degree murder, sexual assault and forcible confinement. His modus operandi was very close to that of Spector. I took that as an indication I was getting it right in some way. My aim in writing The Fall was to explore some aspects of this phenomenon of violence against the female body.

A key concern in creating dramas that tackle such issues is the degree to which they compound the problem by glamorising violence against women. Perhaps those people who have raised concerns about the issue of women in peril in The Fall are asking the wrong fundamental question. Surely the first question is: why write about a serial killer at all? I think it would be hard for anyone on Woman's Hour to argue that it would be somehow more palatable if the victims were young gay men or small boys.

Clearly, I find serial killers fascinating in some terrifying way. Myths about vampires and werewolves surely spring from that very human desire to explain such shocking and mystifying events to ourselves. Why would anyone stalk and kill one human after another? It seems so aberrant, so senseless, that we seek reasons. It seemed to me that the simple idea of identifying the killer from the start would give me the opportunity to explore the psychology of such an individual in some detail – something I think is impossible in the whodunnit.

I was at pains from the start to make sure that there was nothing gratuitous or exploitative in the drama. Sexual killers eroticise violence, power and death, so it's a challenging line to walk, and different people will have different reactions to the drama. Equally, I didn't want to sanitise Spector. Given that he is a voyeur, it felt necessary, in telling the story from dual points of view, to include a degree of voyeurism in the way the victims are presented. But there were several decisions I made early on to help deal with my own concerns about having women as victims. The first season of Spiral starts with a mutilated, naked female corpse in a skip. The first season of The Killing opens with a girl running for her life through a carefully lit wood. I never felt – even in 20 hours – that I got to know that victim. The very first Prime Suspect, written by Lynda La Plante, which aired back in 1991 – starts with the brutal murder of a young prostitute. The case becomes more complex when a second body is discovered.

Violence against women, often graphic, has been part of TV drama for a very long time. My concern has always been that because we don't know who they are, we feel nothing for these victims – not even their fundamental humanity. One of the ways the killer is able to perpetrate such crimes is by objectifying and dehumanising their prey. Torturers do the same thing. I think it's important that drama doesn't do that. For that reason, The Fall starts in a comparatively restrained fashion – with Spector exploring someone's private space – stealing underwear, leaving a macabre calling card on the bed, orange peel on the table. This is important because it speaks to a range of male behaviours that have often been dismissed as minor nuisances – flashing, stealing underwear, making obscene phone calls – but that are all acts men do in order to reassure themselves of their power and potency. They are predatory expressions of aggression.

We wait until the end of the first episode before the violence erupts, but by then my hope is that the audience knows Sarah Kay and sees her as a fully fledged human being – a sister and aunt, someone struggling as a solicitor with a demanding man going through a complex divorce, someone with hopes and dreams and plans for the future. Her dead body is eroticised by the killer – in a way that I'm sure is uncomfortable to watch – but I did all I could to ensure that she remained a powerful, human presence even in death, right up to the moment her father identifies her. I wanted people to feel the pathos. For my ideas to work, we have to see Sarah Kay very differently from the way Spector sees her.

Another key decision was to keep the overall bodycount low. Too many of these dramas sacrifice one woman after another, something I was determined to avoid. I knew The Fall would disturb, but I didn't want it to exploit.

No-nonsense characters such as ­Sarah Lund in The Killing owe much to British detectives like DCI Jane ­Tennison, according to Swedish crime writer Arne Dahl

Obviously the decision to have the crimes investigated by a female detective was part of my aim to tackle head-on issues of male violence against women. I wrote Prime Suspect 2 back in the day, so I was partly responsible for developing the character subsequently played by Helen Mirren across many seasons. I noticed with interest that Swedish crime writer Arne Dahl – whose drama series named after him has aired on BBC4 – recently suggested that no-nonsense characters such as Sarah Lund in The Killing owe much to British detectives like DCI Jane Tennison. When it came to the creation of Stella Gibson, I wanted her to build on that tradition, but my starting point was almost more a question of the things I didn't want her to be.

TV detectives are sometimes more a collection of tics or character traits than living, breathing individuals – mavericks who break the rules (thereby destroying, in reality, any possibility of getting a conviction), drunks trapped in a bad marriage with a troubled teen child, and so on. I believe character is revealed through action. For Gibson, I decided I would tell the audience next to nothing about her private life, but let them learn about her little by little via the choices she makes. The actor who plays her, Gillian Anderson, was fully behind that as an idea. She wanted to keep Gibson as enigmatic as possible. That only works if you have an utterly compelling performer, and Gillian is remarkable at conveying depth of thought in any situation.

Clearly Gibson's decision to proposition the detective sergeant in the street has huge ramifications and is troubling to her male colleagues – but she refuses to apologise. Under patriarchy, women's sexuality is often only permitted a limited expression. Gibson insists she has a right to an autonomous sexuality. Sometimes a female TV detective is just a man played by a woman. Claudette in the LA cop series The Shield was quite literally that – a part originally written for a man wasn't changed at all when they decided to cast a woman. For me, Gibson's femininity was central.

Having a female protagonist made it possible to articulate, through her, various ideas about male violence against women that seemed important to me. She sees nothing mysterious about what the killer is doing. It's just misogyny – age-old male violence against women. She sees such violence as endemic in patriarchal societies. In the first scene in the bar, Sarah Kay makes mention of the Mosuo people to her solicitor colleague – who is trying his best to seduce her. She evokes a matriarchal society with no words in their language for rape or murder. Feminist analysts such as Andrea Dworkin have pointed out that perhaps the most clear representation of patriarchal force – rape – is not a crime of passion, or uncontrollable male sex drive, attraction or victim provocation but a crime of power and control. This is a view Gibson touches on again and again throughout the drama. She rightly identifies Spector as a power/control killer and she drills down into some of the attitudes – the toxic cocktail of thoughts and feelings – such an individual holds.

Helen Mirren as DCI Jane Tennison in Prime Suspect. The Fall's writer Allan Cubitt also wrote Prime Suspect 2.

In the first episode we understand that he compartmentalises his life, objectifies and dehumanises his victims, and is driven by powerful perverted fantasies. In fact, all the men in the piece struggle with their sexuality in some way. Gibson holds the view that all human activities and emotions are on a continuum. In other words, we all compartmentalise, we all objectify – just to a greater or lesser extent. The men who commit these crimes are seldom ravening beasts with blood on their fangs. As Gibson says, we are looking for someone's husband, brother, father and son. An uncomfortable thought for us all.

One of the other things I was at pains to do is to point out that there are other victims to consider – his own family. His little girl dances for him in all innocence. She also has night terrors. The truth is that he is destroying his own children as surely as he is destroying the young, professional women who are of his chosen victim type. He is, of course, a victim himself of his own psychopathology.

I think the best of these sorts of shows on TV often have a very strong sense of place. In a way, the whole trick with creating a compelling drama is to create a distinct world. Belfast as a location has a very particular quality – a product, perhaps, of its history. A history, in part, of violence. That history casts a long shadow. Interestingly, there has never been a killer like Paul Spector in Northern Ireland. Long may that remain the case.

It will be interesting to see what the audience makes of our final episode. The good news, from my point of view, is that we have been recommissioned. It gives me the opportunity to explore some of these thoughts and ideas in greater depth. I can't give too much away at the moment, but the victims won't always be women.