I had been speaking to Salman Rushdie for about an hour, in a bookshop café in New York, when a burly man in a baseball cap approached him.

“Are you Salman Rushdie?” he asked loudly.

“Yes,” said Rushdie – who, it’s true, was instantly recognisable. Over the years everything has become a little paler (greyer beard, lighter glasses) but the general outline is the same, and his gaze still contains a mixture of somnolent scepticism and impish joviality.

Haruki Murakami: the moment I knew I would be a novelist

The man laughed in astonishment. “I can’t believe it!” he said. “I was just sitting over there and I… I… I’m Mike. I’m an admirer of you because you…”

He paused for thought.

“… You fought against terrorists. You were held hostage? For, like, 40 days?”

“Yeah. Forty days and 40 nights,” said Rushdie, with a small smile that both humoured the man and willed him to leave.

“You’re – you’re not a Muslim, right?” asked Mike, forging ahead.

“No.”

“You’re a Christian? A Roman Catholic?”

“No,” replied Rushdie. “I am not a religious person.”

“Oh, wow,” said Mike. “Can I get your autograph?”

“Er…” said Rushdie. “OK.”

Salman Rushdie with broadcaster and novelist Victoria Glendinning Credit: Ian Jones

It was hard not to marvel at this unexpected encounter, especially for the light it cast on Rushdie’s mixed-up predicament. It is 26 years since Ayatollah Khomeini sentenced him to death for having written, in The Satanic Verses, an allegedly blasphemous fiction, and 17 since that fatwa was officially lifted. Although Rushdie has moved freely for almost twice as long as he was under threat, the rest of the world is suddenly interested in the pressures that no longer affect him. Just when he appears to have a quiet life, he is called on to discuss grand acts of terror. Though he has wrestled with arguments about reason and religion since he was a boy, he is writing at a time when no one wants to hear complicated answers about the faith he knows best. And, perhaps most paradoxically, he remains famous for having been in hiding – even if he did often manage to hide rather sociably.

Three years ago Rushdie published a 600-page memoir, Joseph Anton, titled after the alias he had used under the fatwa. The book came out of him “like a kind of flood”, he tells me in the SoHo bookshop. “It was as if it had been dammed inside me.” It allowed him to draw a line under that period of persecution – the period about which he is always asked – and partly as a result of that unburdening, he began a novel that aspired to be as fabulist as the memoir had aimed to be true. “I just emotionally swung to the other end of the spectrum,” he explains.

Toni Morrison on racism, her new novel and Marlon Brando

Rushdie has authored almost 20 books, and out of all of them, the two he most enjoyed writing were those he wrote for his sons, Haroun and the Sea of Stories, in 1990, and Luka and the Fire of Life in 2010. (The names in their titles are Zafar and Milan’s middle names.) Both were inspired by the wonder tales told to him by his own father when he was a child: from the Thousand and One Nights, from the animal fables in the Panchatantra, from the Kashmiri collection called the Kathāsaritsāgara. But those original stories were not intended for children. They were not morality tales – they were about wickedness and deceit and, as Rushdie recounts, bad guys who win. “So I thought: maybe I could do that – instead of writing for my sons, I could just write a book for the general readership.”

The result is Two Years Eight Months and Twenty-Eight Nights (that’s a thousand and one, in case you’d missed it), an homage to the Arabian Nights and the funniest novel Rushdie has written in years. It’s narrated by storytellers who live a thousand years from now – they can change sex or skin colour by manipulating their own genes – whose tales concern their “ancestors”; that is, our contemporaries. The ancestors are unwittingly united by a family tree that dates back 800 years, to the moment a genie fell in love with a then-discredited philosopher named Ibn Rushd and had dozens of half-supernatural children. A storm hits New York City in the early 21st century, and allows the genie, or “jinn”, to slip through one world into another. So begin “the strangenesses” – events that take place over two years, eight months and 28 days, and which owe as much to Gabriel García Márquez as they do to Hurricane Sandy. A gardener realises his feet no longer touch the ground; a would-be graphic novelist sees one of his own characters come to life in the corner of his bedroom; the clothes of every man in Times Square disappear, leaving the men naked and the contents of their pockets tumbling to the ground. Rushdie makes these stories so intentionally surreal that he signals their pedigree by referring to Magritte, Ionesco, Beckett, Buñuel. (Under the influence of the jinn, “a Belgian man looked into a mirror and saw the back of his head reflected in it”.) Of course, it’s all metaphorical. As Rushdie tells me: “Fantasy that is not grounded in reality is only a children’s story. If you’re going to do it for grown-ups, it has to be a way of talking about the world.”

Burning issue: a demonstration against Rushdie’s book The Satanic Verses, in Bradford, Yorkshire, in 1989 Credit: Sipa Press / Rex

The funniest aspects of the book are the voices – a superb character called Jimmy Kapoor, who lives in Queens with his mother; the horrendous man-eating socialite Teresa Saca; a pompous British composer and pundit named Hugo Casterbridge; the ruthlessly opportunist Ukrainian-American mayor of New York Rosa Fast – and the mischievous gags. For instance, Casterbridge writes an article in The New York Times positing that after they had enjoyed what you might call “the first Big Bang”, Adam and Eve invented God. God was so furious at having been brought into the world that he threw them out of the Garden of Eden, “into, of all places, Iraq”.

There’s a silliness about Rushdie – or not quite that. There’s an enjoyment of silliness: it’s the glee that comes through, both in this book and in his demeanour. His laughter is a machine-gun-like ripple that decorates his speech. And glossing over his historical research, he tells me he has at least met a real genie, because he once knew Robin Williams.

The lasting appeal of Christopher Isherwood

Years ago, when he showed his 10-year-old son Zafar an early draft of the book he had written for him, he received some useful criticism. “It needs more jump,” Zafar said, and Rushdie rewrote it. This new book has plenty of jump.

Two Years… is, in Rushdie’s own expression, a novel of ideas, and the ideas – about rationalism and magic – are very similar to those that led him to write The Satanic Verses in 1988. In Joseph Anton, Rushdie explains that his surname was invented by his father, a lawyer, adopted in tribute to the 12th-century Islamic philosopher Ibn Rushd (this new novel’s first character and guiding spirit). The family name, he writes, was “a gift like a message in a time capsule”, because his father’s fascination with that philosopher’s attempt to grapple with reason and religion inspired him to write The Satanic Verses. And then: “the battle over The Satanic Verses provided a 20th-century echo of that 800-year-old argument”.

"Write your books or don’t write your books, but don’t write them being scared": Salman Rushdie’s latest novel pays homage to A Thousand and One Nights Credit: Dan Callister

This time around, he says he is aiming to be “more playful, less exact”. He is not interrogating the Koran or writing dream sequences about Mohammed. What Two Years allows him to explore is, as he puts it, “one of the sad ironies of Ibn Rushd”: that his way of thinking turned out “not to be that central to the way in which Islamic philosophy developed. But it was very central to the way in which Western philosophy developed. People like Thomas Aquinas were very influenced by him. It became very important to Western humanist secular thought, but he would not have described himself as humanist or secular.”

Does Rushdie mean that if only Islam had paid more attention to the ideas of his namesake, things would be better?

Why Vanity Fair is the greatest novel about Waterloo

“Yes,” he says. “Because that was the defeated strand – the one that said you must use the tools of reason and logic, and not just the language of superstition and faith.”

I ask if he thinks there’s anything in the book that is likely to land him in trouble.

“What?” Rushdie replies with a shrug. “Everything lands me in trouble. I only have to go out for the evening, and I’ve landed in trouble.” (Rushdie is fond of a party and eyebrows are often raised at the alacrity with which he appears to be making up for lost time.)

So does he think he’ll get into trouble or doesn’t he?

Rushdie's 2012 memoir Joseph Anton felt like it had been "dammed inside of [him]". Photo with Victoria Glendinning at a Booker Prize party in 1988 Credit: Ian Jones

“I don’t think about it,” he says. “My view is: either write your books or don’t write your books. But don’t write them being scared.”

What about the passage that suggests that “the practice of extreme violence, known by the catch-all and often inexact term terrorism, was always of particular attraction to male individuals who were either virgins or unable to find sexual partners”. If only militants had more sex, they’d lose interest in suicide belts?

“It’s true,” Rushdie replies.

What I thought was a joke about extremism, he takes to be self-evident. “It seems to me a lot of this has to do with young men in places where it’s impossible for them to have normal relations with members of the opposite sex, and where they’re so impoverished that the idea of making a family is untenable,” he explains. “And then they go and pick up a gun and feel glamorous and it appears that women are just provided for them. You can understand that that has something to do with what’s going on. It doesn’t explain why the women want to go. Why are these girls all defecting? That seems to me a much more peculiar thing than the men.”

I ask him if there’s a conversation about Islam that we should be having and are not.

“It’s not that we’re not having it,” he responds. “It’s to do with the terms of the conversation. For instance, there’s a genuine desire to say, about this extremism, that it’s somehow not Islam. And it seems to me that’s nonsensical. Because when everybody involved in that project says that it is, who are we to say that it isn’t?

Elizabeth Smart and George Barker: the love affair that inspired a literary classic

“Now, of course,” he continues, “it’s an Islam which is not what many Muslims would say they practised. That doesn’t stop it from being Islam. If you’re a writer you’re in the business of description. I’m not able to solve the problem, unfortunately. But I think one way of absolutely not solving the problem is not to call it by its true name. You have to see this as a cancer growing inside Islam. At least, as a first step, let’s talk about the right thing.”

As for his own life, he says, “It’s pretty dull, thank you.” He has lived in New York for almost 16 years, married, divorced, and, after a lifetime of not belonging, settled down. In the bookshop where we meet, a cookbook by his fourth ex-wife, Padma Lakshmi, is prominently displayed. Rushdie chuckles as he notices it. They’re good friends, he says, though he wasn’t a hundred per cent polite about her in his memoir, and one suspects retaliation may yet be in store, since she is now writing a memoir of her own.

Rushdie says he’s working on some new stories. Having written a screenplay for Midnight’s Children, the memoir and a script for an aborted sci-fi TV series, all in the past few years, he’s glad to get back to the “day job” of writing fiction.

“My life got too interesting for a while,” he suggests, “and I’m quite happy that it’s boring. When you’ve been deprived of everyday life and then you get it back, you grab it with both hands – it’s all you want. Seeing friends, reading books, going to the movies: leading an ordinary, unimportant life.”

I’m not sure the autograph hunter would say Rushdie was succeeding in that particular venture, but I suppose ordinariness, like much else, is relative.

Two Years Eight Months and Twenty Eight Nights is published by Jonathan Cape on September 10 at £18.99. To order a copy from the Telegraph for £16.99 plus £1.99 p&p call 0844 871 1515