It's a mad, mad world in the trailer for "The Lighthouse."

Robert Pattinson and Willem Dafoe stars in the psychological thriller about two lighthouse keepers in the 1890s who are slowing descending into madness.

“How long have we been on this rock? Five weeks? Two days? Help me to recollect,” Dafoe says to Pattinson.

They start to grow suspicious of each other, see visions of threats, and engage in physical violence — all while the stormy seas buffet them.

The film comes from Robert Eggers, who found acclaim with his 2016 directorial debut "The Witch." That paid homage to classic horror stories, while "The Lighthouse" honors classic black-and-white thrillers. It received positive reviews and buzz when it debuted at the Cannes Film Festival a few months ago.

"The Lighthouse" opens in select theaters in L.A. and New York on October 18 with a wider release to follow.