It has happened at last! Finally, the literary world is a meritocracy! Crime fiction – which I first became aware of as the Best Genre Ever when I read my first Enid Blyton mystery at six years old – is now officially the UK’s bestselling genre. Nielsen Bookscan data at the London book fair has revealed that crime novels in 2017, for the first time since Nielsen’s records began, sold more than the category rather vaguely labelled “general and literary fiction”. Crime sales of have increased by 19% since 2015 to 18.7m, compared to the 18.1m fiction books sold in 2017.

This might be the first time that the genre I write, read and love has outsold any other, but it’s certainly not the first time I’ve been asked: “Why is there such an appetite for crime novels?” Crime fiction was extremely popular long before it was the most popular, and so we crime writers have to answer this question all the time. Sometimes it is presented in an evidently disapproving manner: “Can you account for the unstoppable popularity of crime fiction, Ms Hannah? And where were you at 9pm on Tuesday evening? Writing a crime novel, I bet.” (Prolific authors take note: the word “unstoppable” is never truly intended as a compliment, and you should be suspicious of anyone who uses it about you.)

Appetite for crime novels … Sophie Hannah. Photograph: AFP/Getty Images

So why is crime fiction suddenly the most popular genre of fiction in the UK? I think readers have a sense that this is a genre that will: a) prioritise their pleasure and entertainment over anything the writer might want to get out of the experience; and b) offer a guaranteed a gripping plot. Yes, many literary novels have fantastic plots, and some crime novels are as dull as a puddle in a potholed pavement – nevertheless, as a genre, crime always promises suspense and action in a way that general and literary fiction does not.

Crime novels put the balance back in life … Evil is punished, and the good guys mostly win, after solving the puzzle David Baldacci

Bestselling thriller writer David Baldacci has said: “When times are stressful and it looks like the bad is winning out over the good, along comes the genre of crime novels to put the balance back in life. People inherently don’t like folks who do bad to get away with it. In real life they do, all the time, because of a variety of factors. But in novels, evil is punished, and the good guys mostly win, after solving the puzzle. And all is right with the world. At least fictionally.”

Solving the puzzle: for most of us, that’s life. Will we get the job we want? Does our sister-in-law secretly hate us? Is our current relationship going to last? We’re spurred on by not knowing and desperately wishing we did. Crime is the only genre that puts puzzle-solving – making sense of what the hell’s going on – at the centre of everything. It’s closest to our core motivation, as we blindly stumble through life, needing but never being given all the answers.

Doing good … David Baldacci. Photograph: David Levenson/Getty Images

Still, this has always been true of crime fiction, so what accounts for the sudden surge in the genre’s popularity? Here we need to look at another eternally popular genre, romance, which also has puzzle at its centre: where will true and lasting love come from? Is true happiness possible? Is he The One? Just as comeuppances for bad guys are not always delivered by real life, neither is the perfect soulmate with whom we can live happily ever after.

Both crime and romantic fiction are driven by quests for conclusive answers and happy endings. The killer being safely locked up is as much a happy ending as marrying Mr or Ms Right. In both genres, the realism of the driving force (puzzle/need for happy resolution) combined with the not-quite-so-realistic comfort/fairytale value of the genre-prescribed ending (safety restored/happiness with a true soulmate) is what appeals.

Selina Walker, publisher of Century and Arrow, attributed the recent rise of psychological thrillers to them being “a sort of ‘melding’ of the women’s relationship and detective genres”. And she is right; in this genre, which I first encountered in Nicci French’s The Memory Game and Joy Fielding’s See Jane Run, the crime puzzle and the love puzzle are wrapped up in the same package (“Is he/she the one, or is he/she dangerous for us?”). Many readers, perhaps most, will recognise this dilemma from our real lives, because in the UK’s new bestselling genre, the problems that accompany that question are usually — and with a comforting lack of realism — resolved as soon as one knows the correct answer.