The new film, “Heading Home,” about Team Israel’s Joe Hardy-like ride through victory after victory in the Major League’s 2017 World Baseball Classic, is a sports documentary, of course, but a love story all the more. As unlikely as their on-field success, even more unlikely was the Jewish and Zionist pride that percolated among the American-born players who, when first recruited, had only the most tenuous ties to anything Jewish, let alone to Israel, the country they were representing.

And yet, before every game, when Team Israel lined up along the foul line for the national anthems, all the players removed their baseball caps only to reveal a yarmulke on every head. First base coach Nate Fish said matter of factly, “This is what we do. We represent a Jewish country. We cover our heads.”

“Heading Home: The Tale of Team Israel” was produced by Fred Wilpon, the Jewish owner of the Mets, and directed by Seth Kramer, Daniel A. Miller and Jeremy Newberger, all with roots in Young Judea. The directors had earned two Emmy nominations for their PBS documentaries, “Untold Stories of Jewish Partisans” and “The Trial of Adolf Eichmann.”

Cody Decker with Mensch mascot, Chung Sung-Jun. Getty Images

All but two players for Team Israel were American Jews, but according to the tournament’s “Heritage” rule, players could represent a country if they had at least one grandparent from that country, or if the player would be eligible for citizenship (as all Jews are through Israel’s Law of Return). Team Israel’s catcher Ryan Lavarnway, who played for the Red Sox in the 2013 World Series, couldn’t help but think of the Nazi “mischling” law that defined a Jew by even one grandparent. “Two generations ago,” said Lavarnway in the film, “the way this team was put together would have meant that we were being killed. … For us to be able to stand up here and have the Israel flag and Jewish star hanging in the stadium, it [means] we’re here.”

Israel was not the only team utilizing the heritage loophole. In 2012’s tournament, there was only one Spanish-born player playing for Spain, and Team Italy had coaches and players like Mike Piazza and Brandon Nimmo of the Mets. Israel’s closest thing to a star was Jason Marquis, who won 124 games over 15 years, as well as starting a World Series game in 2004. The preponderance of American players greatly upset one Cuban journalist who, after Israel defeated Cuba, is shown grilling Team Israel’s manager, Jerry Weinstein, a former coach for the Colorado Rockies. Said the Cuban, “Israel has not properly recruited a team of its country. … [It’s] a team that should represent Israel but actually represents the United States.”

Manager Weinstein kept his cool but answered firmly: “Well, I don’t agree with that. All our guys qualify under the ‘Heritage’ rules. … We’re Team Israel and make no mistake about that.” Later, Weinstein adds, “it’s just Cuba’s face-saver [so they can say], ‘We didn’t lose to Israel…’ That’s B.S. You lost to Israel, brother.”

Between rounds, philanthropist Sheldon Adelson lent his private plane to take several of the players to Israel, to better understand the country they were representing. The players went to sessions about the peace process, experienced the fun house of Tel Aviv, and then went to Jerusalem’s Wall. Josh Zeid, who pitched for the Astros, said, “I wrote a note and just started talking. I was just talking to God. … I wasn’t asking Him for things, I was just telling Him things.”

With a trip to Yad Vashem, Team Israel’s Ike Davis, who once hit 32 homers for the Mets, spoke about growing up with intermarried parents, a Baptist “redneck” father, former Yankees pitcher Ron Davis, and his mom, Millie, a Jewish guitar-playing “hippie. … No wonder they got divorced.” Davis tried to fill-in a family tree. “On my father’s side I had six, seven generations; on my mom’s side there were, like, three people. … She said, ‘that’s what happened during the Holocaust. Most of the family didn’t make it.’”

Said Davis, “Not really being around a lot of Jewish people, I [didn’t] know how much Israel meant to me. So coming here is really cool, to dive in and learn a lot more about my history.”

Several players said they were proud to “wear Israel across my chest.” Winning the first round in Brooklyn, said Zeid, “was the first time that I felt I won, really won, because it’s not about… any of our careers, it’s about something bigger.” Baseball didn’t leave him much room for a Jewish life, he thought, but that was then: “Baseball kind of took me away, and now it’s bringing me back.”

The smart money put the odds against Israel at 200-1. In a 16-team tournament, they were ranked 41st in the world. They were called a team of “has-beens and never-will-be’s.” ESPN compared Team Israel to the Jamaican bobsled team. They made it as far as the third of four rounds. Maybe the smart money wasn’t so smart. As Zeid put it, “You tell people they have no chance? [Israel] will give them one helluva fight.”

The film ignores how New York Jews doubted Team Israel as much as anyone. Even with the first round being played in the Brooklyn Cyclones’ beautiful stadium, with no Shabbos conflicts, Israel’s three “home games” averaged only 2,600 fans, less than half of what the Cyclones normally draw.

Team Israel beat baseball heavyweights Cuba, South Korea, China, Taipei, and a Netherlands team starring Didi Gregorius of the New York Yankees, despite Team Israel’s roster being mostly journeymen. Team Israel’s infielder Ty Kelly said, “This team is an island of misfit toys. [Some of us] spent years in the Big Leagues but felt unappreciated in this game… We have been kicked around our entire careers. We know what it’s like to be doubted. We’re not gonna be intimidated.”

One of Israel’s best journeymen was Cody Decker, who criss-crossed America playing for such minor league teams as the Missions, Chihuahuas, Sea Dogs, Storm Chasers, Isotopes, Fifty-Ones, Rumble Ponies, and lately the Reno Aces. In his only big-league shot, he went hitless in 11 at-bats for the Padres in 2015, with one run-batted-in. It was Decker who brought a life-sized, bearded, tallis-wearing plush toy Mensch on the Bench into the dugout before every game, and into every press conference. Asked by reporters who the Mensch on the Bench was, Decker said with a straight face, “my manager, Jerry Weinstein.”

But Decker was completely serious when he put on his blue and white jersey. “It looked like the Israeli flag,” he said. “All I kept thinking to myself was, how proud my grandfather would have been to see this.”

In Tokyo, the film captures Israel’s equipment manager saying Kaddish in the dugout for his father’s yahrtzeit, answered with amens. Before the game on Purim, a parchment Megillah was chanted, right there in the dugout, the players banging away when hearing Haman’s name. In the top of the ninth, as Israel was beating “international power” (said the TV announcer) Cuba 4-1, the film’s soundtrack featured the Megillah being chanted softly, the camera cutting between the parchment and the turf. The TV announcer was beside himself: “Israel again! Can you believe it? This magic carpet ride continues for Israel.”

Then the carpet ride ended. Eliminated by Japan, Zeid said, “We wanted to keep it going… To a man, we are so proud to have represented Israel, our heritage and American Jews.”

Davis mused after the loss: “It’s not just about winning. That’s [one of] the greatest parts about being Jewish. You don’t always win, but it makes you tough. Israelis are tough.” A few moments later, speaking to an Israeli boy, he says, “that’s the great thing about Israel. If you have Jewish family and Jewish blood … you feel it’s actually like home. I think that’s what [we were] here for, to find that.” n

“Heading Home: The Tale of Team Israel” screens on May 29, 7 p.m., at the Marlene Meyerson JCC Manhattan, 334 Amsterdam Ave., followed by a Q&A with Team Israel’s Davis and Shlomo Lipetz, general manager Peter Kurz, MLB.com reporter Jonathan Mayo and directors Kramer, Miller and Newberger. Advance tickets ($9 members, $12 public) may be purchased online at https://bit.ly/2K6h1DZ.