"Deathtrap" is a play constructed like one of those children's toys that is a nest of boxes, each one smaller than the one it sits in. Playwright Ira Levin ultimately writes himself into the tiniest box, but the route is certainly entertaining.

Barter Theatre's production of the thriller, which opened Friday, is a satisfying rendition of a play that is an openly commercial vehicle about a playwright who writes thrillers but hasn't had a Broadway success in too many years. ("Nothing recedes like success," he complains.) He has received a play from a student that seems to have all the earmarks of a commercial hit.

By the end of the first act the first murder has been committed, and a series of deceptions set into motion. The play within the play is the play that we're seeing, and two sets of characters lust after the gold mine it will produce. Indeed, "Deathtrap" has been a brilliantly successful creation, is still running on Broadway and in numerous places elsewhere, and is soon to be a major motion picture.

It's all extremely clever, a thoroughly professional piece of craftsmanship in which the pieces fit together like a well-made cabinet. At one point in the play the student and the playwright are working out a piece of stage business for the play they are writing, and the student suggests that the director of the play should figure it out instead of them. No, counters the playwright, a professional playwright would not leave such details to a director; a professional playwright makes sure everything works. Levin obviously knows what he's talking about.

Of course, murderers always end up killing themselves, and this thriller complies with that law. Most of the cast has been decimated by the time the curtain falls, but they are dispatched in unexpected ways and the shocks are satisfyingly shocking, which is an essential ingredient of a thriller.

Ross Bickell as the playwright helps things along with a sardonic intelligence that would mark the passive intellectual rather than a man capable of murder. Edward Gero gives the student an evil aura that makes us appropriately uneasy, and Eunice Anderson as a batty Dutch psychic is, as described, welcome "comic relief." John Olon's direction is efficient and effective.

DEATHTRAP by Ira Levin; directed by John Olon; set by John C. Larrance; costumes by C.L. Hundley; lighting by Christopher H. Shaw. With Ross Bickell, Cleo Holladay, Edward Gero, Eunice Anderson, Craig Kuehl.

At the Barter Theatre, The Harris Theatre at George Mason University, through Dec. 20.