LOS ANGELES — The end is at hand for “Foyle’s War,” the absorbing, impeccably produced World War II-era series that moved smoothly from crime to spy drama as the years passed.

That the final three episodes build to a satisfying conclusion somewhat eases the loss. More solace: John Mahoney, known from “Frasier” for his comedy chops but with his roots in drama, guest stars in episode one of “Foyle’s War.”

Mahoney, who played cranky but good-hearted dad Martin Crane on the NBC sitcom, is a far less appealing man on “Foyle’s War,” which debuts Monday on the streaming service Acorn TV. (The onetime PBS drama will be syndicated to public TV stations in May.)

Did the actor, a self-professed fan of “Foyle’s War,” ask to be part of the final hurrah?

“It was just one of those lucky things,” he said. “My agent called and said, ‘They want you for something called “Foyle’s War.” Are you familiar with that?'”

His quick reply: Yes, and sign me up. In “High Castle,” Mahoney plays an American businessman who profited during the war years and, with his son (Nigel Lindsay), seeks to increase the family’s wealth from oil in the reshaped postwar world.

Their obstacles include the quietly brilliant Christopher Foyle (played by the estimable Michael Kitchen), a former police detective and now MI5 intelligence officer, and his ever-chipper assistant Samantha (Honeysuckle Weeks). The Soviet Union also is in the game.

Marty Crane was “a very decent man, an honest man. What I’m playing here is not: I’m not nice to Honeysuckle in the scenes I have with her. I’m rotten to my son in the scenes I have with him,” Mahoney said, sounding quite satisfied with playing an evident bad guy.

The second episode is propelled by U.K. tensions over the formation of a Middle Eastern Jewish state, and the third puts the spotlight on Foyle’s MI5 boss Hilda Pierce, played again with crisp authority and new depths by Ellie Haddington.

Pierce is a formidable colleague — and sparring partner — for Foyle, and the veteran actors make the most of their scenes.

For Mahoney, the series created by Anthony Horowitz hit the sweet spot of what he enjoys as a reader and viewer.

“I love espionage and I love mystery and I love survival and overcoming big odds like they did” in war-battered Britain, he said.

The 74-year-old actor is a U.K. native whose early childhood coincided with the war: He was born in 1940 in Blackpool, England. That’s where his pregnant mother had been evacuated for safety, but the family soon returned to its home in Manchester.

The few memories that stuck for Mahoney include huddling in an air raid shelter and playing among bombed-out houses. His four older sisters shared their accounts, including tucking him into a baby carriage outfitted with a shield against feared gas attacks.

One sister, who moved to the Midwest after marrying a U.S. sailor, was responsible for Mahoney’s decision to make his life in America. He visited Chicago as a college student and fell in love with it.

“The lake, the skyline, the museums, the symphony, the lyric opera,” he said, with gusto. Add in reliably friendly Midwesterners, Mahoney said, and it’s “my favorite place in the world.”

Although he’s been absent for work, including more than a decade taping “Frasier” in Los Angeles and stage appearances in New York (he won a Tony Award for “The House of Blue Leaves”), he always returns home.

“I give up nothing (professionally) by being in Chicago,” said Mahoney, who was preparing to begin rehearsal there on a Steppenwolf Theatre Company production of “The Herd.”

When he traveled to Blackpool, England, to tape his role on “Foyle’s War,” he received a bonus: The producers put him up in Manchester, about an hour’s drive away, so he could visit with family members still living there.

Mahoney’s friends may get a final “Foyle’s War” souvenir.

“I’ve given away many, many boxed sets” of the series already, he said.

LYNN ELBER, AP Television Writer