WEST BERLIN (AP) _ The tiny village of Steinstuecken, just beyond the southwestern city limits of West Berlin, is only a small footnote to the Cold War era. But it looms large as a monument to German-American friendship.

That friendship was celebrated this weekend, as village residents turned out to say thanks and farewell to the American soldiers who were their lifeline to the West.

After World War II, the community of 200 people became part of West Berlin, and fell under the American sector. But when the Berlin Wall went up, the village was cut off from the metropolis by a narrow strip of East German territory.

Only one road link was open. Strict controls hampered residents on trips to Berlin. Villagers feared there would be a total blockade.

That didn't happen - thanks to the Americans.

U.S. military officials posted military police in the village. American helicopters made supply flights, providing the enclave with a vital link to the outside world.

With the unification of East and West Germany a few days away, the villgers gathered Saturday to remember those difficult days.

''The Americans were our greatest security,'' said Gert Knecht, a villager in his 60s. He recalled the many friendships that developed. One American military policeman married a local girl, he said.

Knecht likened Steinstuecken's plight to being able to walk around freely inside your home, but ''you couldn't go out in freedom.''

''Our security came every week by helicopter,'' he said.

Now the helicopter flights are commemorated by a monument in the village, with a design featuring chopper blades.

The farewell gathering, held in a sunny poplar grove, didn't feature any brass bands or elaborate ceremonies. The people of Steinstuecken brought home- baked cakes and pies.

Children clustered around Maj. Gen. Raymond E. Haddock, commandant of U.S. forces in West Berlin, as he handed out badges that said ''Deutsch- Amerikanische Freundschaft'' - German-American friendship.

The regular helicopter flights ended in 1972 after East-West relations improved, but the U.S. Army aviation unit that flew the route kept up ties with Steinstuecken.

A final flight was part of Saturday's ceremony. Villagers, joined by neighbors from the East, waved goodbye to the departing aircraft.

''We must protect this German-American friendship and widen it in the future,'' said the village mayor, Juergen Klemann.

It is a theme that has been often expressed in the final days before the unification of East and West Germany at midnight Tuesday.

Commentators warn that the present peaceful course of events and Germany's allegiance to the Western NATO alliance could change if the United States turned to isolationism and the Germans turned to anti-Americanism.

The burghers of Steinstuecken believe they owe their Western standard of living - and their freedoms - to the years of American protection.

But not all West Germans share their view of the U.S. military presence.

In the early 1980s, hundreds of thousands of West Germans demonstrated against U.S. military policy in Europe, especially the stationing of medium- range nuclear missiles in Germany and other NATO-member nations.

While the United States and West Germany enjoyed good relations during the administration of Chancellor Helmut Schmidt, who left office in 1982, Schmidt's Social Democratic Party showed increasing irritation with U.S. policies. It had long advocated a less militaristic posture of NATO.

West Germans have become increasingly interested in cutting back U.S. troops in their country. There have even been calls for the shutdown of the sprawling Rhein-Main U.S. Air Force base outside Frankfurt in central West Germany, to make room for the growing financial metropolis.

Some of these pressures have been removed - the medium-range nuclear missiles and the chemical weapons are gone - and U.S. and other Allied troops in Germany are to be reduced in response to improved relations with the Soviet Union.

Will future generations of Germans remember the missile disputes and the ear-splitting low-level training flights of the U.S. Air Force? Or will they remember the 1948-49 Berlin Airlift and the special attention paid to Steinstuecken?

Gen. Haddock, whose powers as a military governor of West Berlin end at midnight Tuesday, said in his farewell speech that ''we have an obligation to keep alive the memory'' of the airlift and the chapter of history written in Steinstuecken.

''For they indicate the points at which the history of Germany and the United States of America was a common one,'' he said.