Peter Weir (Master and Commander: The Far Side of the World, The Truman Show) will direct the contemporary gothic thriller The Keep, reports Variety. The film is based on Jennifer Egan’s 2006 best-seller, which is described as follows:

Award-winning author Jennifer Egan brilliantly conjures a world from which escape is impossible and where the keep –the tower, the last stand –is both everything worth protecting and the very thing that must be surrendered in order to survive.

Two cousins, irreversibly damaged by a childhood prank, reunite twenty years later to renovate a medieval castle in Eastern Europe. In an environment of extreme paranoia, cut off from the outside world, the men reenact the signal event of their youth, with even more catastrophic results. And as the full horror of their predicament unfolds, a prisoner, in jail for an unnamed crime, recounts an unforgettable story that seamlessly brings the crimes of the past and present into piercing relation.

The trade says the film is set up at Said Ben Said’s Paris-based production-sales outfit SBS Productions. Weir is writing the screenplay for the film, which has a budget of around $30 million.