Sony Classics’ “The Father” is an act of daring; it could have gone wrong in so many ways, but it works like gangbusters.

The film marks the movie debut of writer-director Florian Zeller, whose background is as a novelist and playwright; in many cases, that would send warning signals.

What’s more, it all takes place in one location, the apartment of Anthony (Anthony Hopkins), so it might have turned out to be a photographed stage play. Third, it toys with the audience, keeping them off-balance about what is real and what’s not.

Those are potential danger areas, but the film is so good that it defies all logic.

Movie adaptations of plays, from Eugene O’Neill to Neil Simon, usually look like filmed theater, and that’s OK; they’re still enjoyable. But it’s magic when a filmmaker can set his movie in one space, yet it seems like pure cinema. Other than “Father,” there are rare examples, such as “Rear Window,” “Twelve Angry Men,” “Panic Room” and Liv Ullmann’s 2014 “Miss Julie.”

“I didn’t want to film a play; that’s not exciting or challenging,” Zeller tells Variety. “I wondered how to use the cinema for what only cinema can do. When you adapt a play, the first advice you get is to create outdoor scenes, to make it more cinematic. I made the decision not to do so.”

Zeller cites an inspiration: “Amour” (2012), written and directed by Michael Haneke. “‘Amour’ gave me the conviction you can stay in one apartment, with two people, without being too ‘theatrical,’ if you tell the story visually.”

Zeller has written five novels, starting with 2002’s “Artificial Snow.” He entered theater when asked to write the libretto for an opera. Since then, he has written a dozen plays. His “Le Pere” (or “The Father”) debuted in Paris in 2012; it has been performed in 45 countries.

When his film debuted at the 2020 Sundance Festival, the loudest buzz was for the performances of Anthony Hopkins and Olivia Colman. They are big news, and Oscar-worthy — but the film is also notable as the debut of an impressive filmmaker.

The usual training grounds for directors are film school, TV or videos. Playwrights who have become helmers are rare, but they’re notable. Exhibit A: Preston Sturges, whose stage success (“Strictly Dishonorable,” etc.) translated into a screenwriting career in the 1930s. He then became a writer-director with 1940’s “The Great McGinty.”

For Sturges’ third film, “The Lady Eve” (1941), Variety said he “has mined some of the oldest entertainment values of stage and film.” Three years later, with “Hail the Conquering Hero,” Variety hailed him as “one of the industry’s best writer-directors.”

Other notables include Ben Hecht and Charles MacArthur, who co-wrote five plays, including “The Front Page” (1928) and co-directed several films; Frank Gilroy, Pulitzer-winner for “The Subject Was Roses” and director of films starting with 1971’s “Desperate Characters”; and, of course, David Mamet and Aaron Sorkin.

In Zeller’s play, Anthony is given clues about the past and present that seem contradictory. As with Anthony, the audience is never sure what’s going on. Zeller wanted “to put the audience inside the main character’s head. I wanted it to be not just a story, but for the audience to experience what it’s like to lose your bearings.”

As for “opening up” the play, there are only a few moments of daughter Anne outside the apartment, “but she comes back almost right away. When you are facing a painful situation, there is almost no outside world any more, you only have your problems to deal with.”

Zeller’s work is theatrical and cinematic in the best sense.