Italian Deputy Prime Minister and Interior Minister Matteo Salvini’s visit to Israel has sparked controversy as a result of the fascist roots of his party, the Northern League. Both Haaretz and the Meretz Party have condemned the visit, while Israeli President Reuven Rivlin plans to snub the most influential minister in the Italian government. If infringing on human rights or forging ties with the radical right is enough to justify a boycott of foreign leaders, why did Rivlin meet with Hungarian Prime Minister Viktor Orbán?

Austrian Chancellor Sebastian Kurz and Philippine President Rodrigo Duterte? Donald Trump’s statements and actions on illegal immigrants have been much harsher than those of Salvini, but our president would never contemplate boycotting a U.S. president, or Russian leader Vladmir Putin, who has a habit of killing off his rivals and salvaged the regime of Syrian President Bashar Assad.

It is difficult to discern a clear criterion in Rivlin’s boycott policy. Even readers of Haaretz will find it difficult to understand when it is permissible to sacrifice your values and principles for the good of realist political considerations.

An agreement signed between Israel and Turkey in June 2016 that ended a six-year rift over Israel’s May 2010 interception of a Turkish flotilla that was trying to breach Israel’s naval blockade of the Hamas-controlled Gaza Strip was described as “necessary” by Haaretz journalist Zvi Bar’el. Netanyahu’s decision to approve the reconciliation deal was “brave” and “the right thing to do,” according to Channel 10 correspondent Barak Ravid, this despite the fact that Turkish President Recep Tayyip Erdoğan is an anti-Semitic tyrant.

So why is it that these considerations are invalid when it comes to Italy?

There is no country in the world whose foreign policy is based strictly on moral considerations. The question is: Do ties with “rebel” governments in Europe serve Israel’s interests?

The answer, to a certain extent, is yes.

The 2008 economic collapse coupled with the 2011 Arab Spring spawned a financial crisis in Europe, waves of refugees and terrorist attacks from the Islamic State. Millions of people blame the European Union for the loss of jobs and control over their national borders. Hence the growing popularity and number of political parties that demand responsibility for determining economic and immigration policies be restored to the national government—see the governments of Poland, Hungary, Austria, Italy and Greece, the Alternative for Germany party, the leader of France’s National Front Party Marine Le Pen, and lest we forget, Brexit.

They all admire Israel and what it represents: a proud nation-state with a traditional society and a thriving economy that defends its borders, fights terrorism and even riles the European Commission. Thanks to friendly ties with Eastern European countries, Israel has succeeded in breaking the consensus in Brussels. Hungary, the Czech Republic and Romania blocked an E.U. resolution condemning the relocation of the U.S. embassy in Israel to Jerusalem.

As for Iran, the Visegrad Group, which includes the Czech Republic, Hungary, Poland and Slovakia, makes it difficult for the European Commission to circumvent U.S. sanctions on Tehran. Recently, Israel signed a memorandum of understanding with Cyprus, Greece and Italy to build an underground pipeline to export natural gas to the E.U.

The special relations with these “rebel” E.U. states serve Israel’s national interest, because they allow Jerusalem to implement a policy of “divide and conquer” on issues such as Jerusalem and Iran, and help promote the export of natural gas to Europe despite opposition among some on the continent to the idea.

On the other hand, Israel has no interest in breaking up the E.U.—a senior commercial partner with whom it has a free-trade agreement—and seeing the widespread proliferation of nationalist parties and governments that tend to oppose free trade and identify with Putin’s Russia.

Dr. Emmanuel Navon is a senior fellow at the Jerusalem Institute for Security Studies.