WHEN Israeli troops stunned the world in June 1967 - seizing East Jerusalem and the West Bank from Jordan, the Golan Heights from Syria, and the Gaza Strip from Egypt - few thought Israel would still be occupying those lands almost 25 years later.Since then, the problem of resolving claims to those territories in accordance with United Nations resolutions has grown more complex. Syria still demands the Golan Heights back, but Jordan and Egypt have given up their land claims in favor of those of the Palestinians. Israeli Premier Yitzhak Shamir's right-wing government, however, is going to Madrid adamant that it will not return any of the land it calls "Greater Israel." Israel justifies its stance on two grounds: that it needs the territories to guarantee its security, and that its people have a historic right, based on Scripture, to all the land between the Jordan River and the Mediterranean. Israel's claim to the Golan Heights hinges exclusively on security. Farmers in the Galilee regularly came under rocket attack from the heights when they were in Syrian hands, and Israeli generals insist they need to control them to forestall any surprise Syrian assault. Some security strategists argue that the West Bank is also essential, because it provides "strategic depth" that pre-1967 borders did not. But during the Gulf war the country absorbed 100 Iraqi Scud missiles, showing that the West Bank can prove immaterial to Israel's security. Religious ideologues claim the Gaza Strip and the West Bank because Jewish people lived there during biblical times. In the words of a man protesting the conference: "God gave Israel the whole land, and what God has given us, no one has the right to take away." Mr. Shamir's Likud government has engaged in a rapid drive to move Jewish colonists into the territories, and solidify Israel's hold. In a bid to "create facts on the ground" in advance of any peace talks, Israel has settled more than 100,000 Jews in the West Bank and Gaza Strip, and 140,000 in East Jerusalem. The only concrete Israeli plan to give up land was drawn up by the late Labor Party leader Yigal Allon in 1970. He proposed annexing a strip of land along the Jordan River and the Dead Sea to to ensure Israeli security and ceding to Jordan the hills to the West. A version of that plan still commands support in the Labor Party, but the ruling Likud has offered only a form of limited autonomy to Palestinians in the territories, while keeping them inside Israeli borders. The Israeli vision falls far short of Palestinian aspirations to statehood, including a possible confederation with Jordan. Israel would allow Palestinian control over daily affairs, and keep security and foreign affairs in its own hands.