The main characters of Kevin Barry's new novel complain that life is "nothing but noise and consternation," although to be fair, their misery is mostly self-inflicted.

Maurice Hearne and Charlie Redmond are both 50-ish, but after years in the punishing drug trade, they look older. Sharing a bench in a Spanish port city, the prematurely decrepit Irishmen are waiting — not for Godot but for Dilly, Maurice's free-spirited daughter. She might arrive on a boat any moment now. Or maybe she won't show up at all. For Maurice and Charlie, the endless hours in this bleak ferry terminal are purgatorial — they've done their crimes, now comes the penance.

"Night Boat to Tangier" is further evidence that Barry, the Irish author of boisterous dark comedies about gangsters ("City of Bohane") and rock stars ("Beatlebone"), is a writer of inspired prose, a funny and perceptive artist who can imbue a small story with tremendous depth. The novel was recently longlisted for the Booker Prize.

Two and a half decades ago, Maurice and Charlie began running drugs and committing the odd assault. They bought big houses in the Irish countryside, where they overindulged. Maurice fell hard for heroin. When a murderous rival threatened his safety, he packed up his family and moved — in the middle of the night. Dilly realized that hers was "definitely not like other families," and at about the age of 20, she took off with some friends. That was three years ago.

Maurice and Charlie think Dilly is in North Africa, so they've installed themselves at the ferry terminal in Algeciras, the Spanish city near Gibraltar. Sometimes they accost young travelers, asking if they've seen a woman who meets Dilly's description. They fill their downtime with "gestures of long-sufferance and woe," chattering endlessly about temptation, excess and aging. A typical exchange goes like this:

"I'd get a dog again, Charlie says, but I don't know if I have the length of a small dog left in me.

"You definitely don't have two dogs in you, Maurice says."

The friends' freewheeling conversations enable Barry to revisit a theme that's often present in his fiction: his characters' complex feelings about "that wet tormented rock on the edge of the black Atlantic." Frustrating "Ireland," he writes, using a different F-word. "Its smiling fiends. Its speaking rocks. Its haunted fields. Its sea memory. Its wildness and strife. Its haunt of melancholy." It's a melancholy that shapes every relationship in the book.

In "Beatlebone," his 2015 novel about John Lennon, Barry called himself "a man who had never knowingly underfed an adjective." It's true — that book is often wonderful, but it's also manic and wordy. "Night Boat to Tangier" is more controlled, more mature, a sad, lyrical beauty of a novel about regret, from a dependably entertaining and perceptive writer.

Kevin Canfield is a writer in New York City.

Night Boat to Tangier
By: Kevin Barry.
Publisher: Doubleday, 255 pages, $25.95.