For about a month, French border guard Romain Puertolas worked on his novel whenever he could.

"I was just standing in the Parisian Metro, which is quite crowded," the French author and border guard told CTV’s Canada AM. "When everyone else was just chatting or checking Facebook or Twitter, I was just writing a novel."

With two young children, working at home wasn't an option.

During the day, Puertolas would deal with people trying to enter France illegally and on his hour-long commute each way he would plug away at his book.

The novel titled “The Extraordinary Journey of The Fakir who got Trapped in an Ikea Wardrobe” tells the story of a fakir (a magical man or con artist) who lives in a remote village in India and needs a new bed of nails. He persuades his friends to help pay for a flight to the nearest Ikea, in Paris, where he meets and falls for fellow shopper Maria. He spends the night in the store and initially hides from security guards in a wardrobe, which is loaded on a bus and shipped to England. The fakir travels around Europe and Africa by plane, ship and hot-air balloon.

"I used to meet a lot of people, a lot of Indian illegal migrants," said Puertolas, who quit his day job in December. He combined a number of people he met through work for his main character. People he describes as not harming anyone, but the only crime they commit is crossing a border without the right documents.

He wanted to write about the problems illegal immigrants face and how unlucky some people are to be born in countries like Sudan.

The author admits writing the book was no effort, but it's what happened afterward that may be the truly magical part to this story. The book was picked up by a publisher in France almost immediately and quickly went to be No. 1 in the French bestsellers' list. The book is available in 36 countries and the film rights have been scooped up.

"We are all human beings and this book is about human beings," Puertolas told Canada AM about why he believes the book has struck such a chord with readers.

Puertolas is now working on his third novel after writing his sophomore book in two-and-a-half weeks.