“It’s deeper than it looks,” one of the characters intones at the close of “The Good Liar,” Bill Condon’s suave, sophisticated adaptation of Nicholas Searle’s 2016 novel. The line might be accurate in terms of the lake being referred to in the line of dialogue, but it’s certainly not reflective of the movie, which is a clever but shallow clockwork contraption about grifting, double-crosses, buried secrets and revenge. But it’s made pleasurable by giving us the opportunity to watch two masters of their craft—Helen Mirren and Ian McKellen—sparring with one another.

The film—written by Jeffery Hatcher and directed by Condon with his customary smoothness (aided by Tobias A. Schliessler’s excellent widescreen cinematography and Virginia Katz’s expert editing) and set in 2009—falls into two roughly equal parts. The first concentrates on Roy Courtnay (McKellen), a charming old con-man whose expression can turn from delightfully mischievous to definitely sinister with the blink of an eyelash. His usual game is to bilk naïve investors like greedy Bryn (Mark Lewis Jones) in spurious get-rich schemes, in which practice he’s aided by his long-time partner in crime Vincent (Jim Carter, from “Downton Abbey”) and other helpers, hired as needed. It might all seem fairly innocuous, except for the marks, except that when he’s threatened with exposure Roy can suddenly turn very nasty indeed, as Bryn will learn.

Roy has a sideline as well. He romances wealthy widows on an online dating service and then takes them for their savings. His latest victim is Betty McLeish (Helen Mirren), who falls for his line almost immediately. Feigning a bum knee, Roy persuades Betty to invite him into the guest room of her modest suburban home, and he becomes a permanent guest, despite the suspicions of her hostile grandson Steven (Russell Tovey). Before long Vincent has entered the picture, posing as a financial advisor who suggests that the elderly pair put their savings into a joint offshore account to maximize profit and minimize tax liability.

More and more the focus shifts from Roy to Helen, who becomes the central figure of the film’s second half, especially after she and Roy take a trip to Europe—something she and her late husband had always wanted to do. While stopping in Berlin, where Steven, a historian by trade, shows them around, revelations occur about Roy’s stint in British intelligence there after the war. In extended flashbacks we see him (played as a young man by Phil Dunster) partnering with a West German officer named Hans Taub (Laurie Davidson) to track down ex-Nazis—an association that will have consequences for them both.

It would be unfair to say more, but one can observe that the shift “The Good Liar” takes at this point might not just strain one’s credulity (specially over the timeline) but one’s patience as well as the untruths that have filled the narrative up to this point come tumbling out. The aim is to do a number on the audience that would rival the best of Hitchcock, but you might think that it’s more reminiscent of second-rate Christie instead.

Still, the picture is carried over its rather grim final act by the professionalism of Mirren and McKellen, who manage to make even the most glaring implausibilities palatable, especially when they’re served up with all the finesse Condon and his crew—including composer Carter Burwell—can muster. When everything has been tied up in a tight (if somewhat unpleasant) bundle, you might complain of the second-hand quality of the result, but still marvel at Mirren’s ability to combine matronly elegance with steely resolve, and McKellen’s to move from impishness to malevolence with equivalent skill. Among the supporting players, Carter’s air of grandiosity is perfectly suited to Vincent, and though both Tovey and Jones come on a bit strong, there’s compensation in the work of Nell Williams and Spike White as two youngsters whose part in the story must remain unexplained here.

“The Good Liar” doesn’t equal the previous collaboration between Condon and McKellen—the remarkable “Gods and Monsters” from 1998. But thanks to its stars, it’s a relatively enjoyable, if lower-class thriller.