Partition plan gave both sides a national territory to found a country. Based in international law and everything.
Problem only that the Arabs/Palis were too greedy and stupid to declare a war and also lose it. Three times in a row. The subsequent enlargement of territory is, to a certain extent, even covered by international law (if only they'd annexed Golan tbh). The major "religious" conflict is based around Jerusalem and the settlements, where a) the borders of three religions conflict (muh UN declaration denouncing the Jewish claim lmao) and b) where religious nutjobs capitalise upon an increasingly right-wing attitude in Israel (keep in mind the country was founded by Social Democrats/Socialist mainly). Beyond that, there has always been a cultural/spiritual aspect of Israel linked with Judaism in general (remember the Paratroops singing 'Yerushalayim Shel Zahav' when moving to and fighting in Jerusalem 1967), but only a certain smaller aspect of the countries legitimization is based in religion.
Having to babysit the intellectually dishonest donkeys on tuz all the time