A planned visit to Israel by U.S. Republican hopeful Donald Trump is turning into one big headache for Israeli Prime Minister Benjamin Netanyahu.

The Israeli leader, widely seen as a supporter of the Republican Party, shares much in common with Trump. But cozying up to the GOP presidential front-runner is fraught with risks, particularly after his controversial calls to bar Muslims from entering the U.S. and comments to a Jewish group that some said bordered on anti-Semitic.

Late Wednesday, Netanyahu moved to contain any potential controversy, saying he rejected Trump's comments about Muslims and that Israel "respects all religions."

Netanyahu said he would be meeting Trump on Dec. 28, just as he agrees to meet any presidential candidate who visits the country, and that the meeting did not amount to an endorsement.

A visit to Israel is considered a rite of passage for U.S. presidential candidates as they seek to burnish their foreign policy credentials and appeal to Jewish American voters, and Netanyahu has hosted scores of candidates and elected American officials over the years.

But the visit by Trump is different.

The real-estate magnate and reality TV star has remained at the top of U.S. polls for months despite increasingly contentious statements that have alienated women, Hispanics, veterans and Muslims. Trump set off an uproar by calling for a temporary ban on Muslims entering the U.S. following last week's mass shooting by a husband-and-wife pair of Islamic militants that killed 14 people in San Bernardino, California.

Over a three-decade political career, Netanyahu has sought to portray himself as the world's foremost expert on Islamic extremism. Yet he has been careful to differentiate between extremist groups and the Muslim religion in general.

No stranger to controversy, Netanyahu came under heavy criticism early this year when he warned that Arabs were voting "in droves" as he made an urgent election-day plea to supporters. Nearly a fifth of Israel's citizens are Muslim Arabs, and getting too close to Trump could risk triggering renewed accusations of racism.

"Overall, I think the prime minister would be happy if this visit would be canceled," said Alon Pinkas, a former Israeli consul-general in New York.

"It puts him in a somewhat difficult situation obviously, not so much because of what Donald Trump has said previously about Muslims, about Hispanics, about women, about John McCain, but what he may say while standing next to the prime minister," Pinkas said.

Opposition lawmaker Michal Rozin of the dovish Meretz party on Wednesday initiated a petition urging Netanyahu to condemn Trump's "racist" comments and to cancel the meeting unless he retracts them. At least 37 lawmakers, nearly one-third of the parliament, signed the petition.

"Imagine that a country or a candidate would say entrance to Jews is forbidden. The whole world would stand up in protest, saying this is a racist anti-Semite. A racist like this has no place here among us," Issawi Frej, a fellow member of Meretz, told Israel Radio.

Netanyahu also risks alienating allies in the United States.

The Israeli leader, whose conservative worldview tends to be in sync with the Republicans on many issues, was widely perceived as endorsing Mitt Romney during a visit to Israel in the 2012 election, contributing to what has become a strained relationship with President Barack Obama.

Although Obama and Netanyahu have tried to patch things up, a warm embrace of Trump could cause a new setback.

Even Netanyahu's natural allies in the Republican Party have been cool to Trump, who is seen as an outsider challenging the establishment with his unorthodox views. Netanyahu is close friends with Sheldon Adelson, a billionaire supporter of Republican and conservative causes.

Like the other Republican candidates, Trump -- whose daughter, Ivanka, converted to Judaism -- has long worked to portray himself as a strong supporter of Israel. In a 2013 video endorsing Netanyahu's re-election, Trump called himself a "big fan of Israel" as Hebrew lettering scrolled below his face.

During the current campaign, Trump's Republican rivals have questioned his foreign policy bona fides, suggesting he lacks the depth and diplomatic skill to tackle crises in the Mideast and elsewhere. Trump has argued his vast experience brokering business deals qualifies him to negotiate with foreign leaders, and he has cited the Israeli-Palestinian conflict as a prime example.

Yet in contrast to other Republican candidates who have been reluctant to criticize Israel, Trump questioned in an AP interview this month whether Israel was committed to the peace process, a concern he said extended to the Palestinians as well.

Though he didn't lay out specifics, Trump said he'd know within six months of taking office whether he would be able to broker a peace deal, adding that the chances for a durable resolution rest with Israel.

Trump also raised eyebrows among some American Jews last week with an extraordinary appearance at a gathering of Jewish donors, where he was booed after refusing to endorse Jerusalem as the undivided capital of Israel. The United States, like most of the international community, refuses to recognize Jerusalem as Israel's capital and says the city's status must be resolved in negotiations between Israel and the Palestinians.

In his address, Trump made several comments that some said promoted Jewish stereotypes.

"I know why you're not going to support me: you're not going to support me because I don't want your money," Trump said. "You want to control your own politician."

In another instance, he said, "I'm a negotiator, like you folks."

Israeli opposition leader Isaac Herzog called Trump's remarks on Muslims "disgraceful," but said Israel must still proceed with caution. "Donald Trump can, at the end of the day ... become president of the United States," he said.

Eytan Gilboa, an expert on U.S.-Israeli relations at Israel's Bar-Ilan University, said Trump's latest statements about both Jews and Muslims would make him "very difficult to receive."

He said Trump's comments about the Jews were offensive to Israelis, and his proposed ban on Muslims brought back painful memories over the treatment of European Jews who were refused entry to the U.S. during World War II. The bitter lessons of Romney's 2012 visit add to the difficulties.

"I think the strategy will be that he (Netanyahu) will welcome Trump, but he won't go out of his way like he did with Mitt Romney the last time around," Gilboa said, adding that Netanyahu may even express "mild reservations" about some of Trump's positions.

"It's going to be a tough game to play, and I don't know how Netanyahu is going to handle it," he said.

(© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)

More From New Jersey 101.5 FM