If there is one question that has been haunting Europe in the weeks since the public transport bombings, it is how these young Muslim men in our midst became so disaffected that they turned themselves into walking time bombs. And how can we stop what happened in London more than a month ago and in Madrid more than a year ago from happening tomorrow in Berlin, Rome or Paris?

At a recent news conference a television reporter put it to Britain's prime minister like this: "In the past two weeks," she said, "have you come up with any understanding as to how people who grew up here, received their education here, enjoyed cricket, enjoyed so much about British life, could have turned on their own people?"

Tony Blair fumbled for some forgettable reply, but the answer should have been lying on his bedside table. For the past 10 years, contemporary British fiction has been sending out warnings -- not coded, but clear -- about what has been happening under our noses here in the West.

Of course one can always look back after what might have seemed like an inconceivable event and find a writer who has had the imagination to conceive of it. One of the most terrifying depictions of terrorist attacks in London comes from Joseph Conrad almost 100 years ago in "The Secret Agent," which featured a sinister anarchist explosives expert called "The Professor" who walks the city with a bomb permanently strapped to his chest so that he can blow himself up at will.

And the past few decades has seen a proliferation of books about deracination from such literary descendants of the Nobel prize winner V.S. Naipaul as Pico Iyer, Ben Okri and Caryl Phillips. All understand the complicated status of the new nomads who live worlds away from their ancestral roots.

But more recently Britain has benefited from a literary boom among second-generation immigrants, telling us, before we knew we needed to listen, what was going wrong.

First, and most acute, is "My Son the Fanatic," a short story by Hanif Kureishi that was first published in the New Yorker in 1993 and turned into a well-received film in 1997. To read it now is to find its prescience chilling.

Kureishi's story is set in a town in the north of England, similar to the places where the four successful London suicide bombers had made their homes. Born in Britain to Pakistani parents, the young protagonist, Ali, grows up as a "good son" -- by which his father means a happy, cricket-loving accountancy student. This is the typical path for second-generation immigrants: successful, integrated children who make their parents proud.

But in Kureishi's story Ali starts acting strangely. His parents worry that he might have turned to drugs, but are even more appalled by the truth: He has become a jihad-hungry Muslim fundamentalist, and thus a stranger to them.

"What has made you like this?" his taxi-driving father, Parvez, asks in horror, and Ali replies: "Living in this country."

Parvez is shocked. "But I love England," he says, "they let you do almost anything here."

"That," replies Ali, "is the problem."

The film version, by the way, ends with an image that has a horrible resonance following London's fatal attacks. When Ali is cast out by his father, he sets off with a loaded backpack on his back, echoing the now-iconic photos of the four suicide bombers entering the train network, looking for all the world as if they were setting off on a hiking expedition.

Seven years after Kureishi, Zadie Smith drew on an uncannily similar conflict as a central theme of "White Teeth," her bestselling debut novel. Samad, a Bangladeshi immigrant working in an Indian restaurant is, like Parvez, slightly cowed as well as uncomprehending of his son Millat's conversion to an extremist Muslim sect. The teenage Millat would be immediately recognizable on the fashionable streets of north London: charismatic, good at football, popular with the girls. But inside he seethes with a macho "righteous anger."

"If the game was God, if the game was a fight against the West . . . he was determined to win it," Smith writes.

Many of the same issues were revived again in 2003 when Monica Ali's "Brick Lane" was published in Britain to wide acclaim. Unlike the first two books, the conflict is not between father and son, with the elders trying desperately to quell the extremism of their offspring. (In "White Teeth," when Millat gets involved in burning books that are banned by Islamic fundamentalists, his parents burn his own books to see how he likes it.) In Ali's novel the conflict is between the two lovers of Nazneen, a naive Bangladeshi girl. She and her husband, a first-generation immigrant also from Bangladesh, settle in one of London's most ethnically mixed neighborhoods and try to make a success of their lives.

But pretty soon Nazneen acquires a lover, Karim, a British Muslim, and she realizes that her two men's attitudes could not be more different. When her husband gets an extremist leaflet through the door asking for money for the families of Palestinian suicide bombers, he is furious. He came to Britain to live on Western terms, to fit in, and he fears this kind of agitprop will turn the natives against him.

"What is all this mumbo-jumbos? Are they mad? Poking these mad letters through white people's doors. Do they want to set flame to the whole place?"

By contrast, Karim has all the natural-born confidence of a handsome Londoner. He is not grateful for what he has got and wants what he thinks he has not got -- equality. Karim is made militant by what he sees as British prejudice and persecution of Muslims (a strong theme, too, of "White Teeth"). At one point Nazneen tells him that Allah forbids suicide bombing. Karim replies: "It's not suicide, yeah. It's war."

When Blair was asked at his news conference whether the threat to Britain was "home-grown," he came to the conclusion that "obviously the inspiration for it, as it were, comes from outside this country."

These writers -- all black or Asian, all either born or brought up in the West -- are trying to tell us something different. Their work reveals exactly how this terrorism was home-grown. Less escapism than reportage, these books show why the rage of the second-generation immigrant can be greater than that of the first. The fictional young men who turn against their fellow citizens draw their ire from their experience of Western society, not from their isolation from it.

When Millat travels to central London determined to kill someone, he steels himself by dwelling on how humiliated he is by his father's lowly job in a land of plenty. "He liked to think he had a different attitude, a second-generation attitude," writes Smith. "That's the long history of us and them, that's how it was, but no more. Because Millat was here to finish it, to revenge it."

Tony Blair -- and anyone else in search of some insight into the phenomenon of disaffection -- should try their hardest to get round to these books this summer. The authors don't have the answers to all the imponderables about the bombings, but isn't it possible that these works of fiction, so celebrated in the literary world ("White Teeth" and "Brick Lane" between them have sold many millions of copies) could have spurred us to take more notice?

Perhaps we did not because the authors' touch was too subtle for that, too witty, too . . . British.

Helen Rumbelow is a reporter for the Times of London, where a shorter version of this article appeared last month.

Reality show: Om Puri and and Akbar Kurtha in the 1997 film adaptation of Hanif Kureishi's prescient story, "My Son the Fanatic."