Leading Scottish writer Val McDermid has said crime novels were popular in Scotland because crime ­writers could keep a "finger on the pulse" of modern society.

McDermid, a bestselling author of crime books, said reading genre fiction was an outlet for the stress of modern life.

The writer, from ­Kirkcaldy, known for her novels featuring Dr Tony Hill, spoke after it was revealed the top 20 most read books from libraries in ­Scotland all belong to the crime or thriller genre.

She said: "Because most crime writers produce a book a year, we've always got our finger on the pulse of contemporary society.

"And now more than ever Scots are fascinated with what's going on in their world."

The writer added: "We feel really murderous a lot of the time and reading about it diverts us from doing it."

The top 10 list of most borrowed books in Scotland features Scottish writers Ian Rankin and Stuart MacBride in 5th and 7th ­position respectively.

Lee Child, creator of the Jack Reacher novels, holds the number one position, with his book The Affair, the 16th novel featuring the character, being the most borrowed book in Scotland in 2012/13.

Three titles by James Patterson also feature in the Scottish top 10 and the US thriller writer was the most borrowed author in libraries across the UK as a whole for the seventh year running.

Fellow crime writer Denise Mina said the quality of crime-writing attracts readers most, saying good crime fiction is something they can trust.

She said: "Crime fiction promise a diverting story and, if it doesn't deliver that, it's bad crime fiction."