PHILADELPHIA — On a recent morning in Cherry Hill, N.J., the biggest threat to personal safety seemed to be sun glare.

But inside a former warehouse renovated to look more like a gym, about a dozen men and women were training as if their lives depended on it. Literally.

They were learning how to spin out of a choke hold, overpower a carjacker, and punch a gun or knife out of an attacker’s hands.

An unusual fitness trend, for sure — one with Israeli roots and where motivation comes from a sense of insecurity rather than concern over love handles or jiggly thighs.

Although the decor at Israeli Krav Maga includes a gun rack stocked with replicas of AK-47 rifles, owner-instructors David Kahn and Don Melnick insist their business objective is not to sow paranoia.

“We want to teach people that danger is out there,” Melnick said.

More accurately, they want to teach people how to react to danger. That it’s out there has been on rather alarming display in just the last couple of months.

In July, a costumed man in Colorado opened fire in a suburban Denver movie theater, killing 12 and injuring 58.

Last month, a Philadelphia police officer who had just finished his shift was stalked by two men, then shot dead in an apparent robbery attempt as he walked to a bus stop dressed in civilian clothing.

Less than a week later, a laid-off textile designer shot in the head a former colleague he blamed for his unemployment, setting off a chaotic scene outside the Empire State Building in New York during which nine bystanders were injured by police gunfire.

That event prompted a dozen calls to Israeli Krav Maga, which also has a training center in Bordentown, N.J.

“We would much prefer not to get business that way,” Kahn said recently.

How the 40-year-old father of two and former defensive back for Princeton University came to a career in self-defense began while he was attending law school in Miami “without wanting to be a lawyer.”

While there, he was introduced to Krav Maga, the official combat system of the Israel Defense Forces and founded by Imi Lichtenfeld in the 1940s, when Israel gained statehood. Kahn said he was hooked after one class.

He would pursue three years of training in the mid-1990s, going to Israel and learning under Haim Gidon, whom Lichtenfeld groomed to succeed him. Lichtenfeld died in 1998, and Gidon is now grand master of the Israeli Krav Maga Association.

“I knew this had business possibilities,” Kahn said. “But I wasn’t focusing on it as a primary business.”

Instead, he returned to the United States and went to work on Wall Street as a partner in a private-equity firm, teaching Krav Maga on the side.

Ultimately, an actor with a tough-guy image would provide the impetus — and some financial backing — to persuade Kahn to make Israeli Krav Maga a full-time business pursuit.

Hardly the picture of vulnerability as HBO’s mob boss Tony Soprano, James Gandolfini wound up training with Kahn from 2002 to 2005. He had urged Kahn to open a Krav Maga facility in New York, but Kahn was moving out of the city to New Jersey.

He opened the Krav Maga studio in Bordentown in February 2007, then the one in Cherry Hill in August 2010. Gandolfini is a silent partner in both; he was working in California and unavailable for comment on his involvement.

At the Cherry Hill center, a recent class of 10 represented a mix of participants, including retired high school chemistry teacher Wayne Michaelchuck, 65, of Gibbstown, N.J. He said he was training four days a week because “my life is worth defending and my family’s lives are worth defending.”

Just 5-foot-2 and 100 pounds, Sarah Mantz, 33, of Moorestown, N.J., was in class, in part, because when she was a student visiting Germany 13 years ago, “I passed four skinheads, and I realized I didn’t even know how to call for help in German.”

Jay Silvagni, 39, is a bail bondsman from Haddon Township, N.J., who, at 6-foot-5 and 300 pounds, would probably scare off more attackers than he’d attract. But when it comes to crime, everyone is susceptible, he said.

“It doesn’t matter how big or small you are,” Silvagni said. “If they think you have money, they’re going to come after you.”