(Doubleday)

A case can be made that Irvine Welsh is the most outrageous novelist now at large in the English-speaking world. The Scottish writer achieved fame — or notoriety — in 1993 with his first novel, “Trainspotting,” which chronicled the joys and horrors shared by young heroin addicts in Edinburgh. Its movie version expanded his cult following. Subsequent novels like “Filth” and “Porno” delved even deeper into an underworld of sex, drugs and degeneracy. Now comes “A Decent Ride” which his publisher calls “his funniest, filthiest book yet.”

All this is not to say that “A Decent Ride” is less than entertaining or without literary merit, but simply to warn that it’s not a book for everyone. It perhaps helps to be open-minded about behavior that, although widespread, does not enjoy social approval. Welsh carries realism to its limits and sometimes beyond. The novel is filled with scenes that are variously shocking, hilarious and both at once.

The novel’s hero, at least for some, is Terry Lawson, who was introduced in Welsh’s 2001 novel “Glue.” Terry, who is 46, makes his living driving a cab in Edinburgh, but his passion is the pursuit of women. When a man enters his cab he’s thinking about overcharging; when a woman enters he’s thinking seduction, not always in vain.

Early in the book, we see Terry’s mind at work when he encounters a one-time lover, recently widowed, at a funeral. He quickly senses an opportunity, because “relationship breakdown and bereavement means double vulnerability. Perhaps he’ll get the old Maggie back.” He does; they proceed straight from the funeral to bed.

(Jeffrey Delannoy)

Someone urges Terry to attend a meeting of sex addicts. He does so gladly, but he doesn’t grasp the concept and is astonished to learn that people are there to tone down their sex lives, not to meet new partners. Then he notes a certain gleam in one woman’s eyes and soon they are out the door.

One night, during a hurricane, Terry picks up an attractive, well-dressed woman who wants a ride to a nearby bridge, one from which many people have jumped. She’s Sarah, a playwright whose latest work has been savaged by the London critics, and he learns that suicide is indeed her intent. He chats her up and then proceeds, admitting that “it’s a wee bit cheeky” to ask Sarah (in the challenging Scottish dialect that readers must struggle with throughout the book) if she’d like to “jist go oot wi a bang, last night oon Earth.” She’s astonished, then amused and finally says yes, whereupon they proceed to several months of voracious sex. She calls him insatiable; he insists he’s “gaun the extra mile fir the purposes ay therapy.”

Terry credits his success with women to three blessings: his gift of gab, the “corkscrew curls” of his hair and the sturdy appendage he calls Auld Faithful. Indeed, Auld Faithful is granted two chapters in which he voices his own unique view of the world.

Terry is horrified when doctors declare that he has a weak heart and must give up sex. It’s the proverbial fate worse than death: “Now he is condemned to a life of celibacy. He will never enjoy a decent ride again.” He must even give up his sideline as the star of scud (porn) movies; he fancies himself “the George Clooney ay scud.” Struggling to take his mind off sex, he takes up golf, reads classic novels, reunites with his long-neglected children and grandchildren, and becomes a better person. Still, we wonder: Will poor Terry ever return to the glories of yesteryear?

Welsh also attempts satire, at one point introducing a rich American businessman who is famous for a popular television show on which he fires people and denounces them as losers. The author describes him as a “youthful, punkish version of Donald Trump” and calls him Ronald Checker. Still, as obnoxious as this character is, he doesn’t come close to his real-world model — fiction can only go so far.

Other dramas, often horrific, unfold. One character is pressured into incest by his obese and lovelorn sister. In one almost unreadable scene, for an unprintable reason,Terry digs up his father’s corpse. There’s a most unpleasant rape scene involving two men.

Still, if much of Welsh’s material is lurid, he tells us a great deal about working-class Edinburgh. Welsh, who says he loves the work of Jane Austen and George Eliot, creates a world more real than a great many worlds we enter in today’s fiction.

Patrick Anderson regularly reviews mysteries and thrillers for Book World.

a decent ride

By Irvine Welsh

Doubleday. 346 pp. $26.95