Grade: B

What at first threatens to be just another revenge thriller following the by-now trite “Fatal Attraction” formula emerges, thanks to some clever feints from scripter Joel Edgerton (who also directed and co-stars), as an engrossing tale of long-buried secrets that finally bring retribution. Without resorting to gore or going the tongue-in-cheek route, “The Gift” is cheekily suspenseful and unsettling right down to a satisfyingly twisted ending.

As the film opens, happy thirtysomething couple Simon and Robyn (Jason Bateman and Rebecca Hall) are house-hunting in L.A. It’s Simon’s hometown, but he’s been based for a while in Chicago; now he’s been relocated to California by the computer security firm where he’s on the way up the executive ladder. After finding a handsome modern place with lots of windows, the two go shopping to furnish it and just happen to bump into Gordon (Edgerton), who introduces himself as an old high-school classmate of Simon’s. The meeting is a bit strained—Simon claims not to recall the fellow at first—but it ends with a vague promise to keep in touch.

That’s not enough for Gordon, who proves a very persistent cuss. He drops by unexpectedly at odd times with an assortment of housewarming gifts, each more extravagant than the last (a school of koi for a backyard pool is perhaps the most peculiar), chats up Robyn in Simon’s absence, and wheedles an invitation to dinner, which he follows up with one to them that turns out very strangely when he leaves them alone in what he claims is his mansion. When Simon decides to cut off the fellow—whom he now recalls quite vividly as the class misfit all the students called “Gordo the Weirdo”—he and Robyn find themselves the target of some very unpleasant payback. Those koi end up unhappily, and the family dog disappears; when Robyn’s home alone, moreover, unexplained noises and furtive shadows sometime intrude on her solitude. Meanwhile Simon is competing for a promotion at work that could take him to the upper echelons of management, even as he and Robyn continue their thus-far unsuccessful efforts to have a child.

It wouldn’t be cricket to spoil Edgerton’s crafty machinations by revealing too much about what follows. But it’s certainly fair to observe that the situation grows increasingly murky as Robyn grows suspicious about what might have happened in their high school years to make Gordon so infuriated and Simon so intent on dealing with him harshly. A predictable narrative would paint Gordo as an unapologetic psychopath harboring resentment that has built up in his own mind over the years into baseless obsession. But Edgerton works more cleverly, shifting the blame from one man to the other as Robyn investigates their shared past and why both appear to be growing more and more unhinged in the present. The last reel not only discloses the truth what occurred between the two years ago, but also brings a resolution to what’s become a feverish feud that might not be terribly credible from a purely realistic perspective but works in genre terms.

In fact, it would be difficult to credit Edgerton with giving much psychological depth to his characters. Simon, Robyn and Gordo are types rather than nuanced human beings—one the driven yuppie, the second the supportive wife who becomes more and more concerned (whether justly or not) that her husband isn’t the person she thought he was, and the third the outsider who might be either victim or villain. They’re the sort of figures you find in pulp potboilers or old hour-long TV mysteries. But in this instance they’ve been cast with actors who give them some of the heft the script doesn’t. Bateman’s adept at adding a dark, snarky vibe to a glad-handing sort of guy, and Hall brings spunk—and vulnerability—to her portrait of a not entirely happy housewife. Edgerton, meanwhile, has written himself a plum part as Gordo, an awkward fellow with a slightly creepy look and a lot of pent-up anger. And while his skill in characterization might not be especially strong, his ability to employ the topoi of the genre in both of his behind-the-camera roles is evident in every frame, though credit also has to be given to Eduard Grau’s atmospheric cinematography, Luke Doolan’s expert editing and the moody but not overbearing music of Danny Bensi and Saunder Jurriaans.

“The Gift”—which happens to be the inaugural release from new distributor STX Entertainment—isn’t the sort of thriller that will blow you away with big, flashy set-pieces (like most Jason Blum productions). Rather it works in quiet, devious ways to create a pleasurable sense of growing unease: it will make you squirm rather than shriek, and you’ll probably enjoy the sensation. It also serves as a warning that people with things to hide probably shouldn’t buy glass houses.