It was a dream which became a nightmare. Neil Arksey, a children's author from London, kept waking from a recurring image of a town engulfed by a wave.
That dream became the seed of his latest novel, As Good As Dead in Downtown, about a boy, Kai, who can hear the shifting of tectonic plates beneath him. He believes a giant wave is coming, but no one believes him.
Mr Arksey took his book on a tour of schools in Phuket, Thailand, in February last year.
"I would dream I was riding on the wave as it crashed down. I could see people fleeing. That was when I woke up," Mr Arksey said.
"I told the pupils how the idea came from a dream, but they said it couldn't happen. I remember being in Phuket on the beach and thinking, they're right. It's such a paradise that it is hard to imagine a tragedy."
Mr Arksey put his dream down to coincidence. He is now donating the profits of books sold through his website to the schools he visited which were affected.
"A librarian I spoke to at one of the schools told me he had spent 15 days packing bodies," he said.
Mr Arksey's eighth novel, Prime Evil, about "the school from hell", has just been completed.