IT could have been a psychopath, a detective, a school teacher or a young wizard.

However, instead of Begbie, Sherlock Holmes, Rebus, Jean Brodie or Hermione Granger, Scotland's most popular character in literature has been named as the less well known Francis Crawford of Lymond.

So who is Francis Crawford? He was - as created by the late Scottish author Dorothy Dunnett - an exile, a scholar, a soldier, a musician, a master of disguise, an outlaw and a noble.

Featuring in her Lymond Chronicles, published between 1961 and 1975, he is the hero of the series of books, an enterprising character from the landed aristocracy of the Scottish lowlands.

He was chosen as the nation's favourite character after 3,150 people voted in an online poll organised by the Scottish Book Trust to celebrate Book Week Scotland this week.

The Scottish Book Trust admitted that the character may be unknown to many.

But it appears devoted fans of the series have voted in their hundreds so that Crawford could win the vote.

Book lovers from around the globe got involved in the vote, with votes coming from 28 different countries including Argentina, Singapore and Qatar.

Francis Crawford came first in the poll with 458 votes, followed by Begbie, from Irvine Welsh's Trainspotting, who received 339 votes.

Begbie was only one vote ahead of Detective Inspector Rebus, the prime character created by best selling Scottish novelist Ian Rankin.

In fourth place was Sherlock Holmes, the sleuth created by Scottish writer Arthur Conan Doyle.

Chris Guthrie, the heroine of Lewis Grassic Gibbon's Sunset Song came fifth, followed by the trainee wizard Hermione Granger from JK Rowling's Harry Potter series.

Mairi Hedderwick's Katie Morag, now a popular children's TV series, came seventh, and Jean Brodie, Muriel Spark's most famous creation, came eighth.

In joint 9th/10th place were Oor Wullie and Harry Potter.

Marc Lambert, the director of the Scottish Book Trust, said: "It's great to be able to announce the top 10 favourite characters from a Scottish book - as voted for by the public - during Book Week Scotland, our national celebration of books and reading.

"Francis Crawford of Lymond may be an unknown name to many, but Dorothy Dunnett's enduring popularity, sustained over the years by her legions of devoted fans, is testament to the strength of writing talent that we enjoy in Scotland.

"Literature is one of the best ways of really inhabiting another person's thoughts, and is the reason why people have such strong feelings about their favourite character.

"It isn't always a traditionally 'nice' character who gets under people's skin either, as is proven by Begbie and Miss Jean Brodie's positions in the top 10."

Hedderwick, whose book has also been turned into a TV series which won two awards at the British Academy Children's Awards at the weekend, added: "I'm delighted that Katie Morag is still a favourite book character. All of 33 years old, she is now treading the TV boards but her first home will always be on the page."

Begbie moved into second position late on Wednesday, following a vow from author Irvine Welsh on Twitter that "If you vote for Begbie and he wins, my next book (after 2015 Juice Terry one) will be a Begbie one."

Members of the public were invited to choose from a shortlist of 50 titles

It was compiled by a panel of experts in collaboration with Scottish Book Trust staff.

Voters also could nominate another character if their favourite was not on the shortlist.