Ukrainians have been using Israel’s experience in general, and snappy quotes from Kyiv-born Israeli prime minister Golda Meir in particular, as an inspiration for Ukraine in its struggle against its giant and aggressive Russian neighbor.

But comparing the Israeli conflict with Palestinians and their Arab neighbors to Ukraine’s predicament is badly misplaced. True, Israel, a very small country, has repeatedly defeated its considerably more populous, larger neighbors and has now become the dominant military power in the region by a wide margin.

However, the picture of the small valiant Israeli David battling the big bad Arab Goliath changes quite a bit if the creation of Israel is viewed as the last of the numerous European colonial projects. For example, Britain ruled India, a huge country, for the greater part of two centuries even though India is located half a world away. Britain, France and Spain had huge overseas possessions, and so did tiny Portugal, the Netherlands, and Belgium which ruled countries many times their size.

Israel was built by European Jews. It was a highly organized, well-educated, and very motivated group of people. The Jewish revival starting in the mid-19th century rocked the three continental empires, where the mass of Ashkenazi Jewry then lived. Some of that energy was directed toward Palestine and the tragedy of the Holocaust pushed the survivors to Israel.

Israel was allied to leading Western powers (initially, until the 1956 Suez Canal debacle, with France and Britain, and after that with the United States). It enjoyed access to the most advanced modern technology, which determines military power. It is, therefore, hardly a surprise that it was able to beat up on its far less developed and poorly organized foes, even if they had the Soviet backing.

Ukraine’s situation is different and is much more similar to that of Ireland in terms of long-term colonial domination by its bigger and more powerful neighbor, The parallels include the man-made famine, the massive emigration and resettlement of the colonized population, the widespread use of the language of the colonial power and, finally, the fact that part of the former colony’s territory has been annexed by the colonizer.

And yet, Israel’s history has valuable lessons for Ukraine — and for Ireland as well, especially since Brexit is making it suddenly very likely that the two Irelands could become reunited.

Although built by diaspora Jews, and initially conceived as a homeland for people without a country, Israel has since become a distinct nation— just as Americans became a nation distinct from the British, and as all other countries in the New World became, even though they were initially conceived as extensions of their home nations. But while Jewish Israelis have been melded into a nation, it is not true even of Israel’s Arab population. Those who hold Israeli citizenship and who make up 21% of the country’s population have shown themselves yet again not to be Israelis but enemies of their Jewish neighbors. This is not surprising since they face discrimination, evictions and humiliations. Some of their Jewish neighbors conduct racist demonstrations with chants of “Death to Arabs” while the police typically stand by.

It has become even more difficult for Israeli Arabs to feel Israeli thanks to the official position of the country’s right-wing government and the “Jewish Nation-State” law passed three years ago.

Israel has retained many aspects of its early socialist state, and it still, even after a generation of right-wing neoliberal rule, takes good care of its Jewish citizens. Not so with Arabs even inside its own borders: eight out of 10 poorest municipalities in Israel are Arab settlements.

There is an even worse scenario in the making. The two-:state solution is now dead — killed by the collective effort of the radicals on both sides — and Israel is permanently stuck with some 2 million Arab subjects on the West Bank and with the other 2 million more in Gaza Strip, even though it has tried hard to wash its hands of the latter.

There is an old adage about Israel being able to be two of three things, in any combination: remain a Jewish state, keep being a democracy and hold on to the occupied territories. But never all three.

Ukraine consists of various bits of territory which previously were part of Poland, Hungary, Czechoslovakia, and Romania. Parts of Ukraine previously belonged to Russia and, more importantly, in many parts of the country, the population was replaced as a result of collectivization, industrialization, the Holodomor, the Holocaust, and ethnic cleansing by the Soviet government under Stalin. Nearly 20% of Ukraine consider themselves Russian. The percentage of Ukrainians in Ukraine is equal to the percentage of Russians in Russia— and of Jews in Israel.

Even now, in the midst of blatant Russian aggression, too many ethnic Russians in Ukraine hold pro-Russian views. Many ethnic Ukrainians, too, would rather have a close relationship with Russia — which in today’s environment frankly means a subservient relationship. A survey last February conducted by the Kyiv International Institute of Sociology found that only 7% of Ukrainians want their country to be reunited with Russia (as opposed to 17% of Russians), but 41% of Ukrainians have a positive attitude towards Russians.

Many more are loyal to Russia in Crimea and even in the Donbas, both places where the population has already experienced all the joys of being part of the Russian Federation.

Dealing with the Russian fifth column is easier during the war. But if the war ends and, moreover, if the Vladimir Putin regime falls and Russia becomes a somewhat more democratic, genuinely prosperous, and peaceful country (of which right now chances are very slim), Ukraine would need to do a lot more for all of its people to develop a sense of unified national identity and national pride.

Right now, the war against Russia brings most Ukrainians together. The fear of being taken over by Putin or ruled by local thugs is a strong motivator for Ukrainian patriotism. But the situation will change once the threat of Russian aggression is eliminated. This is why it is imperative for Ukraine not only to join the European Union and share in the prosperity that will offer but also adopt the democratic safeguards which Brussels demands of all its members.

Israel not only provides an object lesson on how not to create a peaceful nation-state, but its current deep-seated hostility to Western Europe and its values demonstrates why it has created for itself so many massive problems far into the future.