A BOOK written in an Edinburgh cafe has been sold to a publisher in the US for $100,000 and has set Hollywood alight.

Single mother Joanne Rowling's first book, a children's story, was written in snatched moments in the cafe while her baby daughter slept. Her work is being compared to legendary author Roald Dahl, whose successes with Charlie and the Chocolate Factory and James and the Giant Peach made him a favourite with children throughout the world.

Two Hollywood studios and an independent American producer are competing for the film rights for Miss Rowling's 80,000-word Harry Potter and the Philospher's Stone.

The book, published in Britain by Bloomsbury Children's Books, is a tale of fantasy and magic designed for youngsters aged eight and over.

Miss Rowling, 31, was told of the $100,000 pay-out by New York-based Scholastic Books by her agent, Mr Christopher Little, who described the deal as ''unprecedented''.

Miss Rowling said: ''I was astonished. The first feeling was profound shock. I was temporarily paralysed at the time.

''I was writing for me. For someone to offer that amount of money for something that I had written because it is the sort of thing I like reading was incredible.

''Christopher told me there was an auction going on and that 10 companies were involved.

''I did not know what kind of figures we were talking about. I thought perhaps thousands but not a six-figure sum.

''I don't know what I'll do now. I'm very nervous of just packing in my part-time teaching and becoming a full-time author, even though that is something I have always wanted to do.''

Miss Rowling, who had just divorced her Portuguese husband, was unemployed and almost penniless when she started on the book after moving to Edinburgh with her four-month-old daughter Jessica to be near her sister and brother-in-law in 1993.

She pushed Jessica around the streets in a buggy until she fell asleep, and wrote while sipping coffee in a cafe.

She survived on benefits and did some part-time clerical and teaching work but was unable to afford a word processor.

''I was very depressed and having a newborn child made it doubly difficult,'' said Miss Rowling, who was raised in the Forest of Dean and graduated in French and Classics from Exeter University.

''I simply felt like a non-person, I was very low and I had to achieve something. Without the challenge I would have gone stark-raving mad.''

Her achievement has been compared to first-time writer Nicholas Evans' #350,000 payment for his novel, The Horse Whisperer, which became a literary sensation.

Miss Rowling, who has just completed Harry Potter and the Chamber of Secrets, the second of a planned seven-volume series, said the idea for the first story came to her on a train in 1990.

The series chronicles the life of an ordinary boy, brought up by a cruel aunt and uncle, who discovers he is a wizard.

Mr Little, an independent agent, said Miss Rowling was destined for great things, especially given that Scholastic's book club has 80 million members.

''For a one-book deal for a first-time author, this deal is staggering but it is such a good book. She is such a wonderful, original voice,'' he said.

''Her imagination is so lateral. You just keep going 'wow' when you turn the page, thinking where did that come from? I think you can compare her to Roald Dahl.''