YOU really don't want to mess with Diana Jager.

She's a top-notch surgeon with the proverbial nerves of steel who, under the no-nonsense pseudonym of Scalpelgirl, has also been blogging about sexism in the world of surgery.

When she is outed as the author, she is "monstered" online and suffers dreadful threats of rape on Twitter.

Her response to these threats is to post a photograph of her lethally sharp Liston knife together with an unambiguous message about what she will do with it.

Jager is one of the main characters in author Chris Brookmyre's brilliant new novel, Black Widow.

Early on, we read that Jager has lost her post as a result of the furore but she has eased her way back into employment with a job at Inverness Royal Infirmary. There, she surprises herself by falling for, and marrying, a hospital IT tech named Peter. But six months after their wedding, he has been killed in a car accident - and she is on trial for murder.

Another key character here is the journalist Jack Parlabane, making his latest return to Brookmyre's fiction.

Chris says of Black Widow that it's possibly the most compelling story he has written in a long time, and he may well be right.

"As always with my books, I can't remember where the spark [for Black Widow] came from," he says.

"So many things come into it, and I can't remember which one came first. Obviously, it's about a surgeon, but I was maybe more thinking that when my wife [Marisa] was going through her NHS career [as a consultant anaesthetist], I was conscious that a lot of her colleagues were young women who were giving the best years of their life to the job and were having trouble having lasting relationships because of the demands of the job.

"One of her colleagues was around 40 and was fearing she would never meet anyone in time to have a family; she met someone, though, got married, and they went on to have a baby. I was delighted that it worked out but as a crime writer you're thinking: what if that scenario didn't work out?

"There were other colleagues who would ask each other what they thought of someone's new guy – was she in denial about what he's really like, about his negative traits, because she's so desperate for this to work out? That fed into my mind: how much do we lie to ourselves when we desperately want a relationship to work out?

"How you might lie to yourself, but when you get married, that's when it all gets very real, and the question is: has the person you married changed?" Indeed, Jager, for all her professional steeliness, ponders aloud at one point that she fears she has become “a boring stick-in-the-mud who nobody wants to be around”.

As for that acerbic, outspoken "sexism in medicine" blog – how close to real life is it? Very, says Chris.

"Most of the instances of excesses of surgical behaviour [in the book] were actually based on things [Marisa] told me, down the years. Actually," he concedes with a laugh, "I took most of the really extreme ones out: the truths that she told me were far worse in terms of ludicrously infantile or bullying behaviour and abuses of power.

"There are power structures in an operating theatre. I'm sure it is gradually improving, but certainly the things that she or her colleagues were witness to, showed something that should never have been tolerated. It was a culture that tolerated it, but it was a very sexist culture as well.”

It would spoil things to relate exactly how Parlabane, a top-notch reporter now much reduced in circumstances, comes into the story, but it is cleverly done. The book, which Chris categorises as "domestic noir", is a captivating read.

The Barrhead-born author, who lives with his wife and son in Bothwell, attracted considerable attention (not to mention the Critics' First Blood Award for Best First Crime Novel of theYear) for the fast-paced black comedy of his 1996 debut, Quite Ugly One Morning. It opened with a studiously detailed description of a doctor's mutilated corpse and almost simultaneously introduced us to Parlabane – spectacularly hungover and dressed only in a pair of boxers and a grubby T-shirt – who chances upon the body.

His many subsequent books have included One Fine Day In The Middle Of The Night and Boiling A Frog, as well as, more recently, a series about private investigator Jasmine Sharp. The Parlabane novels on their own have sold more than a million copies.

Yet if you've followed his career over the last two decades you'll know that his writing has become more open – more, to use his own words, "morally complex".

Black Widow, with its patient, thoughtful treatment of personal issues, and the exuberant Quite Ugly One Morning, are both linked by Parlabane, but where his debut focuses gleefully on mayhem, Black Widow’s tone is such that when one of its characters makes a brief but touching reflection on what it means to lose one’s parents, it seems entirely in keeping with the rest of the book.

"I think there's been a natural maturing," says Chris. "If I'm being flippant about it, I would say that I can't write the books I was writing 15-20 years now because I don't know everything any more. When I was younger I felt far more secure in my opinions about everything, and, of course, the more you learn, the more shades of grey creep into absolutely everything. Partly, I don't have the confidence to write in that way; but also, I suppose, what I find intriguing about characters has matured, too.

"In the past, it was big, broad-brush issues against a very dramatic backdrop of politics, and I suppose now it's more about the smaller betrayals, the smaller deceits. It's about the issues of deceit and trust in individual relationships rather than deceit-and-trust issues across, say, Westminster. I think that must be a natural thing: you are just going to ruminate more carefully about things.

"It's hard to distil it," he adds, "because it's been such a slow, gradual process. I mean, there are still wee moments when I can see where I can take a story into a slightly more whimsical direction, but with a book like Black Widow, I'm thinking, the tone of it is really important, and I don't want to do anything that is going to alleviate the tension. I want the reader to feel compelled by it.

"I realise that in the past, the books weren't as tight: they were far more about other things, so it didn't matter if you had a wee flight of fancy that made the reader laugh, because it wasn't all about the tension. I suppose there are always different ambitions what I'm trying to do with a book."

* Black Widow is published this Thursday in hardback (£18.99) by Little, Brown www.brookmyre.co.uk