(CNN) - What happens when a once-rejected dystopian novel turns into reality? Ask Scottish author Peter May.

The screenwriter-turned-novelist wrote a book titled "Lockdown" in 2005 about a global pandemic. Fifteen years later, that's our reality due to coronavirus, which has so far infected more than 1 million people globally.

The book, which was rejected by publishers at the time for being too unrealistic, was finally published on Thursday.

The thriller is set in London, the epicenter of a global pandemic that forces officials to institute a lockdown. The story isn't entirely based on May's imagination. He used British and US pandemic preparedness documents from 2002 to make it was as realistic as possible.

"At the time I wrote the book, scientists were predicting that bird flu was going to be the next major world pandemic," May told CNN.

"It was a very, very scary thing and it was a real possibility, so I put a lot of research into it and came up with the idea, what if this pandemic began in London? What could happen if a city like that was completely locked down?"

Bird flu and coronavirus are very different, but the lockdown scenario hits close to home for millions of people currently self-isolating to prevent the virus from spreading.

His current publisher hopes that familiarity will appeal to a wide audience.

Years ago, publishers dismissed the novel as "extremely unrealistic and unreasonable," May said. So he put the book on the back burner and eventually forgot he even wrote it.

That was until a fan on Twitter asked him to write a book set against the backdrop of the coronavirus.

"I thought about it for a minute before I realized that I've kind of already done it," May said. "I told my publisher about it and my editor just about fell out of his chair. He read the entire book overnight and the next morning he said, 'This is brilliant. We need to publish this now.'"

"Lockdown," available only on Amazon UK, is being sold in Kindle format and will be available as a paperback and audiobook on April 30.

May, 68, said he is in the age group most vulnerable to the coronavirus and stands in support of a lockdown. However, he was "extremely creeped out" by how eerily similar the book is to life today.

"When I read it again for the first time since I wrote the book, I was shocked at just how spookily accurate it was," he said. "The everyday details of how you get through life, the way the lockdown works, people being forbidden to leave their homes. It's all scarily accurate."

This story was first published on CNN.com, "A pandemic thriller, once rejected by publishers for being unrealistic, is now getting a wide release"