''Unloved and far from home'' - the title of a recent West German television documentary sums up the feelings of many of the 250,000 United States servicemen in this country.
Stationed here to defend West Germans' freedom against any communist challenge, many young GIs feel isolated, mistrusted, and sometimes the victims of outright discrimination by their hosts.
''I feel like these people are telling me I'm fit to die for them but not to drink in their bars or dance in their discos,'' said a young black NCO who asked not to be identified.
The plight of American servicemen in many areas of West Germany was dramatized by a recent correspondence between Gen. Frederick Kroesen, US Army commander in chief in Europe, and Chancellor Helmut Schmidt.
The general, who himself narrowly escaped assassination by anti-American urban guerrillas last year, wrote that the Army knew of at least 110 establishments, mainly nightclubs, which discriminated against US servicemen, especially blacks. Almost 40 percent of the servicemen stationed here are black, according to figures quoted in the television documentary.
The armed forces newspaper Stars and Stripes, which regularly runs features on the problem, says military equal opportunities officials have listed 135 such trouble spots. But the paper claims that in cooperation with local German authorities, discrimination is gradually being eradicated.
The most common form of discrimination is the ''off limits'' sign posted on the doors of dozens of bars, restaurants, discotheques, and nightclubs in towns with a US military presence.
There is an 8,000-strong American military community in the Bavarian town of Ansbach, near Nuremberg, and 13 establishments display ''off limits'' signs. Others, slightly more subtle, say their premises are reserved for ''members only'' - and employ a burly doorman to turn away unwanted servicemen.
The most frequent reasons given by landlords for turning the US servicemen away is that they are rowdy, or drink too much, or get involved in brawls, or dabble in drugs.
''They don't speak German,'' is another complaint. ''If we let the Yankee soldiers in here, we would lose many of our regular local patrons,'' said the manager of one chic nightspot in Amberg, a town of about 50,000 inhabitants near the Czechoslovak border, which US forces guard by NATO agreement.
The problem seems most acute in the smaller towns, where residents are not accustomed to living in a cosmopolitan community. The mayors of bigger cities, like Stuttgart's Manfred Rommel or Karlsruhe's Otto Dullenkopf, proclaim with pride that there is no longer a single ''off limits'' sign in their areas.
Nevertheless, petty discrimination persists at a level that is almost impossible to detect. Individual black or Hispanic servicemen are refused entry to places of entertainment under flimsy pretexts and are often afraid to report the incidents.
Apart from the social pressure of being publicly named, nightspots that discriminate may face the withdrawal of their liquor license or restrictions on their opening hours, though most local authorities are still reluctant to use these weapons, US Army spokesmen say.
In many cases, black or Hispanic American servicemen are facing the same problems encountered often by West Germany's 4.7 million immigrant population, of whom the estimated 1.6 million Turks make up the biggest single group. ''Foreigners out'' or ''send the Turks home'' are slogans daubed on many a wall from the Baltic to the Bavarian Alps, and the problem gives every indication of growing.
It is a problem of West Germany's own making. For more than 15 years, the government and industry actively recruited foreign labor to provide the necessary cheap manpower for the country's rapidly growing industry. When Bonn ordered a halt to the recruitment of ''guest workers'' in 1973, there were already more than 3 million foreigners living here. The numbers have continued to grow as dependants join their relatives working in West Germany.
Now that the economy has gone into recession, more than 7 percent of the labor force is unemployed, and the welfare state is running out of money, many West Germans say the problems would be solved if the foreigners went home.
Although the government continues to proclaim its attachment to integrating the foreigners successfully into West German society, it, too, is considering drastic methods of at least halting the influx of Turks and possibly giving them incentives to leave. Social workers say these moves have contributed to a climate of uncertainty and fear within many immigrant communities.