IN THE AFTERMATH of World War II, when Russia was building its security system by swallowing and digesting the small states along its frontiers, few obervers would have bet a spare kopek that Finland would remain independent and free.

Though small in population, Finland covers nearly 800 miles of Russia's strategic northern flank, a historic invasion route from the west. The German army was in Finland in World War II, and in heavy fighting on the front north of Leningrad the Finns themselves tied down a few Soviet divisions. After Germany's defeat, the Russians had the power to gobble Finland up, and nearly everyone thought they would.

But nearly 40 years have passed, with Moscow and Helsinki going their own way, each scrupulously careful not to step on the other's toes. To stay free, Finland's interest has been to keep its Russian frontier at peace. To keep peace on its Finnish frontier, Russia's has been to allow Finland to be free.

What a powerful nation and its tiny neighbor have created on the border between East and West is a unique relationship that satisfies Russia's need for security, Finland's for independence. Can this relationship be a model to be applied elsewhere -- perhaps on the troubled frontier between Israel and the Arab world?

Whatever else he was, Joe Stalin was no fool, and he surely was not sentimental about Finns. To beat Germany to the punch, he invaded Finland in 1939, packing a communist clique in the Red army's caissons to govern in Helsinki. But the stubborn Finns fought back savagely, and the Russians never reached Helsinki.

The lesson Stalin learned was that the Finns would not be easily absorbed into the Soviet political system. He could subdue them, but why squander Russian energies keeping them down?

Faithful communist though he was, Stalin thought first of Russia's security. For good historical reasons, security is Russia's obsession, as it is Israel's. Both countries, despite their power, see themselves perpetually threatened by hostile neighbors.

It is ironic that Russia's most troublesome neighbors today are those over which it rules with the heaviest hand. Ultimately, Stalin's attempt to absorb Poles, Czechs and others may prove fatal to the Soviet system. The Finns still revel in their good luck that only in their case did Stalin decide to negotiate a range of security guarantees, then leave them on their own.

Suppose Israel should adopt the same position toward the Palestinians. The Israelis, having conquered the Palestinians, are powerful enough to rule over them, but the huge costs are readily apparent, and they are not likely to diminish. It is these costs that Stalin was unwilling to pay in Finland.

The success of Stalin's Finnish model -- and the permanent instability of satellites on the Polish model -- suggests that Israel might actually be more secure by signing a treaty, then leaving the Palestinians to themselves.

What kind of treaty?

Stalin's security objectives were, first, to make sure that the Finns themselves were in no position to be a military threat and, second, that Finland would not become the platform for an attack by another power.

As the price of withdrawing his army from Finnish territory, Stalin required agreement on a revised border, since the old border lay practically in the suburds of Leningrad. The Israelis would be expected to require similar territorial revisions as the condition of retiring from the West Bank.

Russia also obtained a renewable 50-year- old lease on Finland's Baltic port of Porkkala, 200 miles west of Leningrad, for a defense outpost. But a decade later, after Stalin's death, the Russians decided Porkkala was unneeded and gave it back.

Israel could set similar conditions for its own security, leasing military outposts in the Jordan Valley, or electronic surveillance sites on the mountaintops near Jerusalem. It is hard to imagine circumstances that would persuade Israel ever to give up such emplacements, much less prematurely. But then no one expected the Russians ever to relinquish Porkkala, either.

In 1947, Finland signed a peace treaty in Paris, formally terminating World War II. The treaty imposed a rigorous numerical ceiling on Finnish military strength. It explicitly prohibited all offensive weaponry, including nuclear arms. These limits, with small modifications, remain in force today.

Israel, in negotiating a treaty with the Palestinians, could insist on comparable limitations. The parties could bargain over arms levels, but they would be governed by the principle of Israel's military inviolability.

Like the Soviet-Finnish document, an Israeli treaty with the Palestinians would formalize an existing power relationship. In both instances, it is clear which partner is militarily dominant. A treaty simply formalizes the reality, precluding an arms race.

Arms limitations on the weaker power would make the stronger power feel safe from challenge. In itself, it would safeguard the weaker against preemptive attack. In fixing the military relationship, it would promote stability, and the stability would be an incentive for keeping the relationship intact.

Such a military relationship has for 40 years made the Soviet Union's Finnish frontiers the most stable on its entire periphery. It could have the same effect on the border between Israel and a Palestinian state.

In 1948, in an agreement signed in the heat of the Cold War, the structure of the Soviet- Finnish relationship was completed. It was called a "treaty of friendship, cooperation and mutual assistance," legally committing Finland to remain neutral in the East-West conflict and to defend its territory against any western country seeking to use it as a base to invade Russia.

In return, the treaty conveyed a guarantee that the Soviet Union, outside the area of its security concerns, would not interfere with any course that Finland chose to take. Indeed, not only has Finland cultivated its western political and cultural values since then but it has formalized a range of economic ties with the West.

The Soviet-Finnish treaty of 1948 formulated a set of relations that could meet the essential needs both of Israel and the Palestinians today. The same principles would commit a Palestinian state to a political course compatible with Israel's security interests, while freeing the Palestinians to follow their cultural instincts within a Moslem and Arabic framework.

Just as the treaty saved the Soviet Union and Finland from the impossible task of having to reconcile conflicting political and social systems, its principles could save Israel and the Palestinians from having to find an accommodation which neither wants between Eastern-oriented Jewish values and Eastern- oriented Islam.

In strategic terms, like the Finns, the Palestinians would have a buffer state, defined by Webster as "a small, independent state located between two large, antagonistic powers and regarded as lessening the possibility of conflict between these."

Coincidently, in both cases, a second buffer exists to back up the first, Sweden in one instance and Jordan in the other. It is a double layer of insulation, lessening the possibility of conflict for all of the parties.

Sweden, on Finland's western border, knows it is far safer to have the Finns as a buffer than as armed allies facing a hostile Russia. Jordan, on the eastern edge of Palestine, has had enough warfare with the Israelis and would be relieved to have a buffer between Israel and itself.

Just as Sweden is careful to cultivate Finland's neutrality, keeping NATO forces at arms length, so Jordan would be unlikely to take risks with the neutrality of a Palestinian buffer state. Israel would surely be able to count on Amman, in its own interest, to resist aggressive pressures from more distant Arabs states with much less than Jordan to lose by war.

Israel, having suffered heavily in the Yom Kippur War of 1973, when its defensive lines were nose-to-nose against the enemy, has already accepted the principle of the buffer zone with Egypt. A demilitarized Sinai now exists between Israel's armed forces and Egypt's. Stalin's Finnish model would carry this same principle on at state-to-state level to the West Bank.

Persuasive arguments can be made to demonstrate that, since Russians and Finns are not Israelis and Palestinians, the model would not apply. Indeed, political models are not prototypes, readily adaptable, like four- wheel drives, to any terrain.

Still, the historical struggle between Russians and Finns is by no means less fervent than that between Jews and Arabs. The two peoples were consistently at each other's throats until 1945. Like the Palestinians, the Finns feel a deep nostalgia for land, lost in the postwar settlement, that they consider rightfully theirs.

Russo-Finnish animosity has a lead of several hundred years over the bad blood between Israelis and Palestinians, and only in recent times have the Finns come to acknowledge that Russian power has outgrown them. These days they tend to confine their public antagonism to anti-Russian jokes. But scratch almost any Finn after a night of drinking, and the feelings that pour out resound like an echo of those expressed by some ancestor in the northern forests long ago.

It is reasonable to assume that, hidden among both the Russians and the Finns are forces in search of a pretext, priming for a showdown. Russian imperialists, remembering that Finland was once a duchy of the Czar, would be thrilled to get it back. Finland's irredentists would love to recover the lost provinces.

But, since Stalin made the decision not to swallow Finland nearly 40 years ago, a substantial majority in both societies has acquired a stake in good relations. Their interests have generated a system of public pressures to keep tempers curbed, with the result that the extremists have been stilled.

The Israelis and the Palestinians have not yet acquired such a stake. Imperalists and irredentists run wild in the town societies, proclaiming virtue. The two peoples remain locked in a deadly grip, in which one will not give up its dominance, while the other will not be dominated. Israel has created a version of Stalin's Polish-Czech formula, a model crafted for explosiveness.

At the end of World War II, only a pollyanna might have said the Russians and the Finns would learn to live in peace. But Stalin's Finnish formula gave each of them a vested interest in transforming their antagonism into a decent relationship. It should not be excluded that the formula, given a try, could in time bring a stable peace between Israelis and Palestinians, too.