PRETORIA, South Africa (CNN) -- Vikas Swarup was far from the poverty of Mumbai when he wrote "Slumdog Millionaire," the book that has now become an award-winning movie and Academy Award nominee.
Vikas Swarup says he was inspired by the idea of an underdog coming out on top.
As a high-ranking Indian diplomat, his day job requires him to think about international relations, not the grit of survival in a teeming inner city.
But maybe his heart was in his homeland when he took his first stab at writing fiction with the story of an uneducated slum dweller who wins millions of rupees on a television quiz show.
He wrote the novel in 2003, while finishing an overseas posting before heading to New Delhi.
"My wife and children had already left for India. So I was two months alone in London," Swarup said in an interview at the official residence of his current job as India's Deputy High Commissioner to South Africa. Watch Swarup explain how he wrote the novel »
"There was no comfort, but more importantly there were no distractions. That's why I wrote this book, almost in a frenzy. The idea was bubbling in my head."
Swarup said he was inspired by the idea of an underdog coming out on top.
"Knowledge is not just the preserve of the educated elite. Just because someone has not had a formal education, that does not mean he does not have wisdom and common sense," he said.
"Sometime street knowledge can be as important as book knowledge," he added, as it is with his hero, Jamal Malik, who applies for the quiz show to impress a girl and finds experiences from his tough life give him many of the answers to the questions asked.
"Slumdog Millionaire" has been published in more than 30 languages, and many of the translated copies line a bookshelf in Swarup's sumptuous official residence in Pretoria.
But despite the success of the book and movie spin-off, Swarup has no intention of giving up his day job.
"For me, the job always comes first. I would not want my writing career to come in the way of my diplomatic career."
Swarup did take leave from the Indian Foreign Service to attend the film's premiere in India earlier this month.
As yet he has no invitation to the Oscars, where the movie is up for 10 Academy Awards, including best adapted screenplay, best director and best picture, but he's hoping that may change.
"After all, without the author nothing would have happened."