Sofia Coppola’s The Beguiled is a steadily simmering fever dream that boils over into a hothouse nightmare. It’s a remake of one of Clint Eastwood’s lesser known, but more interesting movies — his flopped at the box office. In 1971, audiences wanted Dirty Harry Clint and not Civil-War-soldier-confined-to-an-all-girl’s-school Clint.

Colin Farrell stars as seriously wounded Union soldier John McBurney, who is found in a Virginian forest by a young girl picking mushrooms. She is a student of the nearby Farnsworth Seminary for Young Ladies, and she decides to bring him there. “You are a most unwelcome visitor,” stern headmistress Nicole Kidman tells him. Not everyone feels the same way.

Cut off from the world and with the men fighting the war, now in its third year, the lonely women of the house are fighting their personal civil wars between repression and desire. When McBurney (“John,” he insists the women call him) tells the headmistress, “Your flower garden needs tending,” he’s not just talking about the hibiscus.

All the while, McBurney is at their mercy; they could turn him in to the Confederate army. He uses his charms on each, including a teacher who yearns to be free of the school (Kirsten Dunst) and one of the older, more precocious students (Elle Fanning). As he recuperates, he takes a more active caretaker role around the house. Farrell’s McBurney seems more an opportunist and less a predator than was Clint, but as the residents start wearing their finest in his presence and vying for his attention, the stage is set for the ultimate payback.

For The Beguiled, Coppola became just the second woman in 71 years to be named Best Director at the Cannes Film Festival. Excellently acted, ravishingly photographed, and intriguingly re-imagined, it’s that rare remake that can stand alongside, or perhaps even in front of, the original.