When a serious academic turns her hand to fiction, the result is magic.

She's a respected scholar of history and science, a writer of high-minded non-fiction with three degrees to her name. So what on earth did Deborah Harkness think she was doing producing a romantic fantasy novel about a forbidden love affair between a vampire and a witch?

"Academics like to have fun, too," the California-based author tells me with a laugh. "Actually, the truth is I didn't set out to write a novel. It began very much as a thought experiment and then sort of crept up on me. It was a wonderful accident, a nice surprise that took over my life and imagination."

Harkness was on a family beach holiday in Puerto Vallarta, Mexico during the rainy season when the idea came to her. On the way through the airport she'd noticed the bookshop was crammed with novels about vampires and magic.

"That got my historian brain going," she recalls. "I realised that today we are very much interested in reading about subjects that would have also interested people in the 1500s: ghosts, demons and things that go bump in the night."

In the 16th century, people used the supernatural as a way of explaining the things around them that they didn't fully understand. What Harkness started trying to do was re-imagine the modern world through 16th century eyes. "I was thinking about a world where science and magic would co-exist, where the supernatural and the natural would be all around us at the same time.

"And I thought what do vampires do for a living? Where do witches hang out? How would a vampire date anyone? The way I answered those questions was through the story."

A Discovery Of Witches (Headline, $39.99) opens with historian and reluctant witch Diana Bishop finding an enchanted alchemical manuscript in Oxford's Bodleian Library. This draws her to the attention of a gaggle of powerful witches, destructive demons and vampires who have been quietly living alongside humans without us realising it. Among them is vampire scientist Matthew Clairmont, 1500 years old, brooding, rich and devastatingly handsome. They fall for each other, despite the fact there is a strict ban on vampires and witches getting it together, and this unleashes a whole lot of trouble.

Interestingly, Harkness claims not to have read the recent slew of vampire fiction before working on the book. So any resemblance to Stephanie Meyer's Twilight series or Elizabeth Kostova's best-selling The Historian is purely coincidental.

"I'm a professional non-fiction reader, that's what I do," insists Harkness, 45. "But in my 20s we had our own vampire and witch moment, courtesy of Anne Rice, whose books I read and loved."

Vampires, it seems, are cyclical - we have periods of being obsessed with them and then they fall out of favour for a while. The 80s was their last in-time and now they're back with a vengeance.

"In some ways I think their popularity right now is about our feeling that we still want there to be magic and enchantment in the world," theorises Harkness. "Magic provides a way of still having room for possibilities, an unlimited sense of what the world offers. Magic is always there when science is found wanting."

There are other obvious influences to be found in the novel, most especially Diana Gabaldon's Crosstitch series. Though Harkness will admit to being a huge Gabaldon fan, she shrugs off the comparison.

"I'm flattered when people say there are similarities as she's a marvellous storyteller. But I don't think it's true beyond the fact that there's a hunky hero and a time- travel element."

Somehow, Harkness managed to write A Discovery Of Witches while also holding down a teaching job at the University of California and blogging about wine in the evenings. "I wrote it in the first two hours of every morning," she explains. "I'd get up at 5.45am and in the blissful quiet before I switched on my email I'd write."

Though it can be enjoyed simply as a fantastical love story, what Harkness has achieved is a novel that can be read on many levels, a sort of modern-day palimpsest, with books within books to appeal to the historians and fact junkies out there.

"I buried lots of historical treasures for people to find and readers are having enormous fun discovering them," she says. "Some have told me it's inspired them to learn more about history. But what I most wanted to give readers was a sense of happy escape, to write a novel that had ideas in it but was also entertaining."

Already, A Discovery Of Witches is a phenomenon. The book has been sold in 34 countries and Harkness is fending off requests for the film rights. "I want to wait a little bit for that," she explains. "The book has only just come out and thousands of people are making movies of it in their heads. Films are wonderful but they do fix an identity. I can't read Pride and Prejudice anymore, for instance, without imaging Colin Firth as Mr Darcy."

Conceived from the outset as a trilogy, Harkness is now working on the second part of Diana and Matthew's tale. "I know the story I want to tell. I just have to get it on the page. I've already written what I believe is the last chapter of the third book."

Once the trilogy is complete she imagines she'll go back to devoting herself to academic writing for a while. "I'll need to let my imagination fill up again," she says. "But now I've unleashed the storyteller in me I can't imagine it will go back in the bottle quietly."