TORONTO -- "Weird" is a vague and imprecise word but it's probably fair to say it can be applied to a boxy black-and-white movie about the feverish psychological battles and explicit mermaid-infused visions of two isolated and increasingly mad lighthouse keepers in 1890s Maine.

For writer-director Robert Eggers, real and mythic collide in strange and hallucinatory ways. He makes rigorously researched period films that nevertheless have an otherworldly fairy tale quality. His first film, the 2015 horror hit "The Witch," wasn't just set in 1630 but grew out of the real folktales and period-authentic nightmares of a family in puritanical New England.

Now, he has moved slightly north for "The Lighthouse," a gothic tale of even greater and frothier intensity with still worse fates befalling the local wildlife. A goat figured prominently in "The Witch." Seagulls have a starring role in "The Lighthouse."

So do Robert Pattinson and Willem Dafoe, who play the two seamen who alone tend a remote lighthouse. Dafoe is Thomas Wake, a crusty and tyrannical salty dog and the possessive "keeper of the light," and Pattinson is his new and progressively frustrated and unhinged assistant, Efraim Winslow. The expressionist imagery and heated atmosphere recall something from Bergman, if transplanted from Sweden to Melville's Northeast. But there are hints of an even stranger brew.

"The hope is that people go in there like, '(Expletive), I'm watching a boring Hungarian art-house movie,"' says Eggers. "And then Willem starts farting and there's a clue that there's something else going on."

It's perhaps fitting that a film so relentlessly blustery, filled with stormy seas and the blare of the lighthouse's fog horn, first signals its more comic dimension with the breaking of wind. As the movie's deranged pitch heightens, so does its humour. Slate has perfectly summarized "The Lighthouse" as "artsy fartsy." It expands nationwide this weekend.

"For me, it was a mea culpa after 'The Witch,"' says Eggers, speaking alongside Pattinson and Dafoe in an interview. "I wanted to make another miserable movie but be able to laugh at the misery. These guys are hilarious and really comedic performers. I was even concerned the film was going to be too funny after we shot it. That's not a surprise about Willem but Rob is a very physical comedian and there are flat-out Buster Keaton splits and things that we cut out because they were just too much. But he went for it."

Dafoe and Pattinson are very different performers but "going for it" has been a modus operandi for each. Pattinson, in particular, has in recent years been on a self-described quest for "weirdness," one he grants he may have taken to its limit in "The Lighthouse."

"I definitely feel like you can't find something weirder," Pattinson says. "But it's not weirdness for weird sake. I think what I meant was just originality. Whenever you find something where you don't really have any kind of archetype to fit it into, you don't have any crutch of something you've done before, it's always so exciting."

Eggers initially offered Pattinson a very different role that he describes as "a posh, sherry-drinking gentleman." (Eggers came close to remaking the 1922 classic "Nosferatu.") When Pattinson turned him down, the 36-year-old director realized the actor was after something more inscrutable.

"I don't particularly know how to describe what my character is at all," says Pattinson, grinning. "That's kind of what I'm always looking for."

The production, while not as trying as the ordeals depicted in "The Lighthouse," was, Eggers says cheerfully, "extremely miserable." It was shot on the rocky, wind-swept southern coastline of Nova Scotia. There, Eggers and his production designer Craig Lathrop built a 70-foot lighthouse with a working beam that could shine for 16 miles. At the film's premiere at Cannes' Directors' Fortnight section, Dafoe joked that the only animals hurt during the film's making were him and Pattinson.

"Actors love to talk about that and it's always a little boring," says Dafoe. "But it's a huge part of this movie. The weather and the conditions were a huge part of it. That really told the story. We were interfacing with nature."

For Pattinson, the environment was oddly comforting, even if he counts a sprint across jagged rock in period-appropriate shoes as his most terrifying moment on a film set. "I felt very at home in it when I was there," Pattinson says.

As much as the production drew from its natural surroundings, Eggers' camerawork was precisely orchestrated. Eggers, who co-wrote the script with his brother Max Eggers, shot the movie in 35mm. It's projected in a square-like 1:19:1 aspect ratio, adding to the film's antique and ghostly atmosphere.

"This is very close to how I imagined it, much more so than 'The Witch.' It's partly because I know what I'm doing more. It's also partly because I had more money," says Eggers.

For the New Hampshire-native, research is an intrinsically part of his filmmaking, including digging through rare old dictionaries for period vernacular. He was initially inspired by a real account of two lighthouse keepers -- one older, one younger -- with the same name. "The Lighthouse" includes long sections of dialogue, old sea shanties and some unforgettable lines. Dafoe acknowledges that one such quotation -- "Bad luck to kill a seabird" -- has stayed with him. "I've probably said that a couple times, like in the shower," he says laughing.

The film's language has prompted natural theatrical comparisons. "The Lighthouse" has some of the menacing comedy of Pinter. As a two-hander of raw masculinity, it recalls a Sam Shepard play. Dafoe, though, likens it to a musical with a rhythm vacillating between activity and meditation.

"It wasn't two monkeys in a cage," says Dafoe. "It was a lion and a monkey, or something."

Whatever the caged animal comparison, such extremes of landscape and drama and cinematography created a tension for the actors that fed into the chamber piece's fevered atmosphere.

"There's something about the particularities of everything you have to go through during the scenes. It creates a kind of pressure that's really, really difficult to get under other circumstances," says Pattinson. "There are some scenes where there are so many bits in them, it would create such a level of frustration because you're having to wrench all these different elements into the same kind of flow. It did feel like it was elevated."

For Dafoe, "The Lighthouse" may be heightened but it's not weird. As strangely specific (and farty) as the movie is, the dynamic between Wake and Winslow isn't just off the coast of 19th century Maine but everywhere.

"The basic story is very practical. Two guys get stuck and they start working on each other to kind of dominate their sense of well-being. But they do it in such an aggressive way because both of them are threatened," says Dafoe. "They're not opposites but they challenge each other. And that's an exciting story. We experience that every day on a different scale. It makes me think about fathers and sons, bosses and workers, believers and non-believers -- a flood of things."