While making “Footnote” (He’arat Shulayim), the story of family antagonism in the world of Talmudic study at Jerusalem’s Hebrew U., Israeli helmer Joseph Cedar found himself obsessed with minutiae. But the writer-director, whose 2007 “Beaufort” earned him an Oscar nomination for foreign-language film, blames his perfectionist manner on his script.

“Every film has a style that is somehow derived from the story,” he says. “This film is about an obsessive, meticulous man (played by Shlomo Bar-Aba), and the way we made the film was pretty much how (the character) would have wanted us to make it.”

Bar-Aba and Lior Ashkenazi play father-and-son scholars of the Talmud, the most sacred collection of Jewish writings. Their deep-seated rivalry comes to a head when they are pitted against each other in competition for the esteemed Israel Prize.

This is only the fourth feature film for Cedar, who was born in Gotham and moved to Jerusalem as a child. He had hoped to unspool the pic at the Berlin fest, where in 2007 he took the director statue for “Beaufort.” But the ever-methodical director determined his film it wasn’t ready.

His lead thesps, he felt, were more than ready. Bar-Aba is a well-known comedic actor in Israel who comes to the pic after a 20-year hiatus from movies. “There is something about him onscreen that you can feel,” Cedars said. “He needed to be photographed.”

Cedars spent six months in rehearsal with the comedian, never knowing the direction Bar-Aba would go in molding and personalizing his character, He says the experience was exhilarating, and an asset to the film.

“I would best describe him as an Israeli Peter Sellers,” Cedars says of Bar-Aba. “People think he’s a lunatic when actually he is, like many lunatics, a genius. You really can never know what his next step will be.”

For Ashkenazi, whose work in “Walk on Water” (2004) and “Late Marriage” (2001) introduced him to international audiences, the role of the son presented an emotional gulf he had yet to encounter in his career.

“In other roles I’ve had, I took the character and downloaded it to my own personality,” he says, adding that he likes to recognize something of himself in the parts he plays. “In this role, I couldn’t do it.”

Ashkenazi’s parents immigrated to Israel from Turkey before he was born and raised him in a secular home. He had never experienced the sort of passion for Jewish text displayed by the film’s main characters, and had nothing he could tap into to make a connection.

Before filming could begin, Ashkenazi, whose handsome, clean-shaven face is part of his trademark, spent eight months growing a massive beard and attending Talmud courses at the Hebrew U. campus.

On set, Ashkenazi admits, he simply had to take the leap. “I had to go to the character and just immigrate there. To a different country, metaphorically.”

The question of country, of course, can never fully be ignored when filming in Israel. Ashkenazi admits he didn’t expect “Footnote” to make it to Cannes, because the typical questions — politics and Palestinians — don’t enter the frame.

“Our little movie is about the Talmud,” he says. “If an Israeli movie goes to Cannes, like “Waltz With Bashir,” it’s about the conflict. So I was very surprised.”

Cedar, however, believes his film hits a universal chord.

“It’s a film about the need for recognition,” he says. “Everyone has that need, and in this film the need goes so deep it becomes a survival story. Life and death. That’s something I would go see no matter what country you come from.”