In gripping performances thick with flavorful period dialect and jolts of ever-intensifying insanity soaked in rum, Willem Dafoe and Robert Pattinson play the seasoned keeper and his new junior mate in The Lighthouse, stuck in isolation on a craggy Maine island in the 1890s for a four-week posting that stretches on and on as the elements grow more hostile. After plunging us into the darkest corners of the minds of a family of banished 1630s Puritan Plymouth colonists in his unsettling 2015 debut The Witch, writer-director Robert Eggers confirms his instant reputation as a master of the New England Gothic with this claustrophobic second feature.

As with its predecessor, the new film is stronger on heady atmosphere and slow-building dread than on the narrative clarity of its payoff, and the full-throttle, violently loopy turns of the climactic stretch will likely lose a slice of the audience. But the director, working with his brother Max Eggers as co-screenwriter, has crafted another distinctive hallucinatory tale, this time melding maritime legend with ancient mythology, lumberjack lore, supernatural suggestion, enveloping elemental terror and the roiling paranoia of prolonged isolation.

Like The Witch, meticulous detail has gone into the creation of a fully immersive world from long ago. The movie is a tad too drawn out for what's basically a single-setting two-hander, but for its bracing originality alone, it demands to be seen, stoking anticipation for where the extravagantly talented Eggers will go next.

That originality is no less legitimate for being steeped in inspirations that extend from Moby Dick to The Shining, with a rugged sense of place that often recalls the setting of Robert Flaherty's seminal docu-fiction, Man of Aran. Again teaming with cinematographer Jarin Blaschke, Eggers shoots the film in the inky textures of low-light black and white and in the boxy Movietone aspect ratio from the late 1920s and early '30s. The format yields especially rich portraiture of the faces of Dafoe and Pattinson, both of whom hold nothing back.

Right from the start, Eggers pulls us into an outpost of otherworldly solitude as the suffused beam of the lighthouse pierces the soupy white fog. Mark Korven's nerve-jangling atonal score of brass, woodwinds and percussion mixes with the intricately layered soundscape of crashing waves and stinging wind, and foghorn blasts that might be mistaken for the cries of whales or the roars of sea monsters.

Thomas Wake (Dafoe) and Ephraim Winslow (Pattinson) are first seen staring directly into the camera, their grave countenances telling us that the cramped cohabitation of these two "wickies" is not destined to go well. The camera then pulls back to reveal production designer Craig Lathrop's brilliant work, a full-scale lighthouse, utilities building and stone guard's cottage built from scratch and nestled into the volcanic rock of Cape Forchu in Nova Scotia, standing in for late 19th century Maine.

In a lustily inhabited characterization that Dafoe bites into with grand theatrical relish, Wake is a crusty old seafarer with wild eyes, a tangled clump of beard and a stiff-legged limp frequently accompanied by a fart. He makes it clear up front that he's in charge, riding Winslow hard to stay on top of such menial chores as mucking out the cistern, swabbing the floors and feeding the engine room furnace, getting prickly and territorial when the young newcomer requests to take his turn tending the light at the top of the tower. Wake insists that he, and no one else, is "the keeper of the light," and an early shot of him sipping a tin cup of rum while basking naked in its beam signals the weird sexual energy that permeates the environment.

Wake's insistence that Winslow stay away from the beacon only makes the resentful newcomer more eager to experience its possibly mystical energy, and Blaschke's shots of Pattinson crouched on the stairs beneath the upper cabin as the revolving beam plays across his mesmerized face are among the movie's most beguiling images. In fact, the tower interior, rather than limiting the possibilities for camera movement, creates a chamber of shadows and light that corresponds to the psychodrama playing out in each man's head.

Winslow, a skulking type of few words whose reluctance to participate in a toast on their first night suggests a troubled history with booze, finds a scrimshaw mermaid figure tucked into his mattress, which feeds his dreams as well as his masturbatory fantasies. While he's cagey about his past, it emerges that Winslow was a Hudson Bay logger who left that work behind under mysterious circumstances and has been drifting from job to job. He's now looking to save his wages and build a house someplace where he can be beholden to nobody.

What the goat named Black Phillip was to The Witch, a particularly cantankerous seagull is to this film, casting a baleful eye on Winslow as if the human intruder is the bird's very own Tippi Hedren. Wake, observing his underling's aggressive response to the feathered antagonist, warns him that it's bad luck to kill a seabird because they carry the souls of sailors who met their makers. But a nasty brush with the gull causes Winslow to forget those words. From that moment, the wind changes, ushering in what Wake calls "dirty weather," a Nor'easter that develops into a fearsome storm, spoiling their provisions and bringing thunderous waves that crash all the way into the cottage.

The toast with which Wake prefaces every evening meal ends with "God who hear'st the surges roll, deign to save a suppliant soul." But neither Wake nor Winslow could be called suppliant, even less so once alcohol is the only thing left to sustain them. And while Wake keeps his daily logbook under lock and key just as strictly as he keeps the light cabin off-limits, Winslow's determination to uncover the older man's secrets turns their escalating battle of wills into a gruesome clash of mutiny and madness.

The Eggers brothers don't much go in for lucid explanations, but as a murky pressure-cooker situation fueled by dream interludes (or are they?) and psychological turmoil to match the rage of nature hitting Wake and Winslow from outside, the movie delivers its share of shudders, along with fabulous arias of anger, wrath and disgust from both actors as the power dynamic bounces back and forth.

Dafoe is in his element, making drolly grandiloquent salty poetry from Wake's old-timey dialogue, while Pattinson at first seems less confident, grappling with an erratic accent. But he grows steadily more commanding as Winslow, whose true identity eventually is revealed, rebels against Wake's authority. Both actors bring invigorating physicality to their performances, along with bracing shots of humor, notably in a night of drunken revelry in which they jig to sea shanties and lumberjack ditties before slumping into a messy slow dance like exhausted lovers. At times it seems unclear if they're going to fight or fuck.

What is clear from the outset is that neither man will come out of their shared confinement intact, but Eggers, his game actors and the impressively resourceful craft team — which includes the key contribution of sound designer Damian Volpe — make their dizzying descent a transfixing spectacle.

Production companies: A24, New Regency, RT Features
Distributor: A24
Cast: Robert Pattinson, Willem Dafoe, Valeria Karaman

Director: Robert Eggers
Screenwriters: Robert Eggers, Max Eggers
Producers: Rodrigo Teixeira, Jay Van Hoy, Robert Eggers, Lourenco Sant'Anna, Youree Henley
Executive producers: Arnon Milchan, Yariv Milchan, Michael Schaefer, Josh Peters, Isaac Ericson, Sophie Mas, Caito Ortiz, Rodrigo Gutierrez, Chris Columbus, Eleanor Columbus
Director of photography: Jarin Blaschke
Production designer: Craig Lathrop
Costume designer: Linda Muir
Music: Mark Korven
Editor: Louise Ford
Sound designer: Damian Volpe
Casting: Kharmel Cochrane
Venue: Cannes Film Festival (Directors Fortnight)
Sales: A24

110 minutes