On a balmy Middle Eastern morning this past week, ace basketball forward Amar’e Stoudemire was busy doing what he does best. Towering over his fellow players, he maneuvered his lithe physique across the court while counting out slam dunks.

Only he was in Jerusalem’s Goldberg Gym. And counting in heavily accented Hebrew.

“Ahat, shtayim, shalosh, arba” (“One, two, three, four”), the athlete chanted as he shot hoops and mastered layups outs with Ryan Pannone, assistant coach of local pro team Hapoel Jerusalem, one of 12 teams in Israel’s Premier League. Clad in baggy red shorts and a white tank top — with a tattoo of God’s name inked in Hebrew along a colossal forearm — 33-year-old Amar’e seemed right at home, more than 6,600 miles away from his home country.

Less than three months after retiring from the NBA, Amar’e is back on the court. Only this time, rather than playing for fame or fortune, the New York Knicks’ one-time $100 million man is playing for God.

Literally.

On Saturday night, he made his home-court debut as the newest member of ­Hapoel Jerusalem.

“I feel like I can be myself here in Israel,” Amar’e tells The Post. “I don’t have to feel like an outcast because I want to live a holy life.”

Three years after buying a minority stake in the franchise, Amar’e has signed a two-year contract with Hapoel. Along the way, he’s moved his wife, Alexis, their four young children, Alexis’ mother and even their Jamaican personal chef to Jerusalem from South Florida, where he most recently played with the Miami Heat.

He’s the great American hope for Hapoel, which sees the basketball star as the key to finally squashing long-time rival Maccabi Tel Aviv on the road to national and European-league success.

“There has never been a player at Amar’e’s level come to Israel before,” says Eran Soroka, NBA analyst for Israel’s Sport5 network and chief editor of the Nana 10 news site. “Even if he doesn’t end up as their top scorer, he’ll be the marquee player for Hapoel this season.”

It’s an unexpected next act for a star athlete whose 14-year career saw him play for the everyone Phoenix Suns, the Dallas Mavericks, the Miami Heat and, of course, spend five buzzy years as a Knicks forward. But it marries Amar’e’s two greatest passions — basketball and Judaism.

“I wanted to be in Jerusalem because it’s a holy place,” Amar’e says over lunch after practice in his elegant stone home in Jerusalem’s upscale Talbiya neighborhood, close to Israeli President Reuven Rivlin’s residence.

Dark-skinned and nearly 7 feet tall, Amar’e makes for an unlikely Jew, even in a nation where Jews exist in every size and color. “Both of my parents come from a Hebraic background,” Amar’e says, digging into a plate of pasta and fresh vegetables. “My family are Hebrew Israelites descended from the Kingdom of Judah.”

Hebrew Israelites, or “Black Hebrews,” is the general term for the thousands (if not tens of thousands) of African-Americans who, like Amar’e, believe they originate from the ancient Israelite tribes expelled from the Holy Land more than 2,000 years ago. While they’re not formally recognized by mainstream Judaism, Black Hebrews have formed vibrant, yet small, communities across the United States and Israel.

In their most ascetic form, Black Israelites adhere to a strict vegan diet and abstain from alcohol and most other indulgences. Amar’e’s not quite so temperate.

“Well, I do like my whiskey,” he says with a chuckle. “But [my family and I] are mostly kosher and never eat pork or shellfish at home.”

Traditional dietary laws are just one of the many Jewish tenets that guided the Stoudemire family even before they came to Israel.

They celebrate Hanukkah and Passover rather than Christmas and Easter, gather for weekly Sabbath meals most Friday evenings and — at least in Amar’e’s case — will fast this week for Yom Kippur, the holiday of atonement.

“Just a few days ago we were blowing the shofar for Rosh Hashanah and soon it will be time for Sukkot,” the athlete says. He and Alexis “may even begin talking about a bat mitzvah” for their 11-year-old daughter, Ar’e.

The couple’s three eldest children, including son Amar’e Jr. and daughter Assata, study at a local international school. (Youngest son Alijah is not yet school-age.) Mere weeks after enrolling, they’ve already had play dates, the parents boast.

Jerusalem has a history of terror attacks, but Stoudemire says he’s never felt safer. “People have this misconception of Israel as dangerous,” he says, “and I hope I can help change it.”

The athlete has described himself as “culturally,” if not necessarily ethnically, Jewish — so much so he wore a yarmulke and Jewish prayer shawl for his 2012 West Village wedding. Yet he wasn’t always so open about his complex identity. Barely 10 years ago, he was still “in the closet” as a Jew, kept there by conventional notions about race and religion.

“Folks find me curious because in the US they don’t expect black people to be Jewish — they’re not really sure how it’s even possible,” Amar’e says. “White Jews are often skeptical about my claims, while African-Americans are not totally sure what’s going on with me.”

Raised Christian, Alexis initially struggled with the adjustment to Amar’e’s faith, although the move to Israel was something the couple had long considered, says Amar’e.

Today, the couple — who met in 2002 at an after-party following a Nelly concert — is still struggling with Judaism, just on a far more quotidian level. There are biweekly Hebrew lessons to help master the ancient Jewish tongue, along with trips to biblical sites like Jericho and the Negev Desert to learn Jewish history.

And then there is basketball and its almost fanatical Israeli fan base.

“Fans here are very intense,” Amar’e explains. “They yell, they scream, they chant throughout the entire game — not just when we score, like in the US.”

‘Fans here are very intense…They yell, they scream, they chant throughout the entire game — not just when we score, like in the US.’ - Amar’e Stoudemire

Amar’e’s arrival to Hapoel comes at a particularly meaningful moment for the Jerusalem team. Flush with cash from new majority owner Ori Allon — who co-founded the Manhattan-based real-estate app Compass in 2013 — Hapoel has a new home stadium, new Italian head coach, Simone Pianigiani, and, they hope, a new star in Amar’e.

Local sports experts like such as NBA analyst Soroka are both optimistic and realistic about Amar’e’s chances to turn around Hapoel, which has won just a single Israeli championship (2014-15) since the league began in 1953.

“No one here believes it will be easy, particularly with Amar’e’s recent history of knee injuries,” says Udi Hirsch, deputy editor-in-chief and basketball commentator at Jerusalem’s Walla News. “But people are already talking about his seriousness as a player. He’s come across as very modest, very human — not like a star.”

Much of that has to do with Jerusalem itself. The city’s casual, informal lifestyle, Amar’e says, is a far cry from the Fashion Weeks and Met Galas that were part of his life in Manhattan. Fashion-plate Alexis, for instance, marvels that “no one ever really wears high heels here.”

“Israel has allowed me to disconnect from vanity, to stop worrying about things like what other people are doing,” says Amar’e, who cameoed in Amy Schumer’s 2015 hit film “Trainwreck.”

“Of course, there’s paparazzi and celebrity culture here, too,” he adds, “but it’s nothing like back in the States.”

Nonetheless, Amar’e has cultivated a high-profile social presence.

He posed with Jeremy Piven during the actor’s recent Israel visit, appeared at the US ambassador’s residence during a Rosh Hashanah celebration and enjoys dining at Jerusalem hot spots like Karma and Ticho House. Already, Amar’e is easily recognized across the city.

“Is that him? Is that him?” squealed a gaggle of awestruck cops in Hebrew when they saw the hoopster this week at a favorite Jerusalem gathering spot. Amar’e may not yet understand their words, but he quickly understood that the police wanted a selfie.

“I love my new team, I love my new city. This is the most fun I’ve ever had in my career,” he says. “Being in Israel is the ultimate new beginning. I feel like I’m a rookie all over again.”