Thriller writer Val McDermid has a soft spot for Oxford. It is the setting for her latest blood-thirsty novel Trick of the Dark, and she says her time as a student here in the 1970s left her with a love of detective fiction.

She is best known for her series featuring criminal profiler Tony Hill, set in the fictional northern town of Bradfield. Her first Tony Hill book, The Mermaids Singing, won the 1995 Gold Dagger Award for Best Crime Novel of the Year. The second, The Wire in the Blood, inspired the TV series featuring Robson Green as Tony Hill.

Her other detectives, Lindsay Gordon and Kate Brannigan, are based in Manchester, and the big cities of the north seem an appropriate place for her tales of gory serial killings. So why choose to set her latest murder mystery in Oxford, usually the backdrop for a gentler kind of murder?

She said: “I’d been thinking about it for years, but the right story never came along. I have made references to Oxford before, and there have been a couple of rural settings, so I don’t always stick to big cities.”

She returns to St Hilda’s most summers for a crime fiction conference, and it was a similar event a few years ago that suggested the plot for Trick of the Dark. “I saw a wedding party and wondered ‘what if the bridegroom was murdered?’ she said.

The college in Trick of the Dark — St Scolastika’s, nickname Schollie’s — is the scene of the book’s first murder, when shocked wedding guests find the groom’s body, his skull bashed in, floating by the landing stage for the college punts. It is also the scene of a cover-up of a later murder, engineered by college fellows to avoid a scandal at the time of a major fundraising effort. So that will be St Hilda’s?

“It’s a mixture — no one college — it’s an amalgam of the women’s colleges as they were back when I was there. You can’t write about specific places — you don’t want to get yourself involved in libel.”

She says Oxford played such a large part in her development as a writer that it was bound to work its way into one of her novels. “It was an enormous culture shock, coming from a working-class Scottish mining community — a transformative experience. It opened up a series of opportunities that would never have been there otherwise.”

She arrived at 17, the first Scottish state school pupil at St Hilda’s, which in 1972 was an exclusively women’s college. She said: “I had never experienced anything like it.

“People didn’t understand what I said, and things like food were difficult. You would get vegetables that I had never seen — I didn’t know whether they were table decorations.”

In her final year, she came out as a lesbian — an experience which filtered into her descriptions of the dilemmas faced by her latest sleuth — Manchester-based psychiatrist Charlie Flint, who, like Tony Hill, works as a psychological profiler — and other characters in Trick of the Dark.

The critical attitude she developed while studying English has stood her in good stead. “A system that makes you read out two essays a week, when someone unpicks your work — that’s enormously helpful to a writer. It’s difficult to write anything and not subject it to improvement.”

She added: “Although we didn’t study detective fiction, you would see those green-and-white spines of the Penguin crime series. I formed the idea that it was intellectually respectable to read them, and I didn’t feel that they were inferior in any way.”

After Oxford, she worked as a journalist for 16 years before the success of her first published book, Report For Murder, allowed her to become a full-time writer. Earlier this year, she was awarded the Crime Writers Association Cartier Diamond Dagger and last year St Hilda’s made her an honorary fellow.

Trick of the Dark was written as a stand-alone, and the author is cagey about which of her many sleuths will feature in her next book. “With me, it’s always driven by the story I want to tell. Sometimes you have to wait for the right story to come along.”

At the moment she is involved in the TV filming of Distant Echo, another standalone, published in 2003 and, unusually, set in Scotland.

Last weekend, she was delighted to find herself at the Woodstock Literary Festival with Morse author Colin Dexter. “I have always been a huge fan of Colin’s,” she said.

* Trick of the Dark is published by Little, Brown at £18.99.