Sen. Lindsey Graham of South Carolina ripped into a few of his fellow 2016 Republican presidential candidates Thursday, saying Republicans are doomed if they put forth a nominee with uncompromisingly hard-line positions on issues such as immigration and abortion.

“I believe Donald Trump is destroying the Republican party’s chance to win an election that we can’t afford to lose,” Mr. Graham said at an event hosted by the Republican Jewish Coalition.

“Mitt Romney’s one of the finest men I’ve ever met — he’s a wonderful man,” Mr. Graham said, referring to the 2012 GOP presidential nominee. “When he embraced self-deportation, he made a mistake, because he exposed our party to a concept that most Americans don’t buy and very few Hispanics buy at all.”

Mr. Trump has been among the most staunch opponents of illegal immigration in the 2016 field, calling for mass deportations of illegal immigrants and for a wall along the U.S.-Mexico border.

“That sound familiar to you?” he said to the crowd at the Republican Jewish Coalition event. “Every one of ‘em — including their American citizen children. That’s the leader of the Republican party.

“You think you’re going to win an election with that kind of garbage?” he said. “It’s not about turning out more people — it’s about getting more people involved in our cause.”

Speaking about the issue of abortion, Mr. Graham said: “If a nominee of the Republican party will not allow for an exception for rape and incest, they will not win. Ted Cruz doesn’t have an exception for rape or incest.”

He said “almost anybody” can beat former Secretary of State Hillary Clinton, the Democratic front-runner, as long as they’re right on “two issues.”

“Immigration, and having a sensible position on social issues,” he said. “If we don’t have those two positions right, we’re gonna get creamed.”

At one point, Mr. Graham seemed somewhat surprised himself by the nature of the speech. Most of the Republican candidates speaking at the Republican Jewish Coalition’s presidential forum Thursday were expected to focus largely on issues tied to foreign policy and Israel.

“Not the speech you thought you were going to hear, right?” he said. “Not the speech I thought I was going to give.”

But he still said his support for Israel is unwavering.

“Do you think I even need to talk to you about my support for Israel?” he asked. “I’m the first guy to go to the RJC event and never mention Israel in 15 minutes. You know why? ‘Cause I don’t have to.”