It did not take long for liberation day here to turn ugly.

First there was celebrating. Early in the afternoon, thousands of residents of this city in the heartland of Kosovo's ethnic Albanian culture rushed to embrace German troops streaming in from Albania. They threw flowers, wept and shouted, "God bless you! God bless NATO!"

But soon came the venom. Some in the crowd began pelting Yugoslav army and Serbian civilian vehicles with stones, smashing windshields and menacing the occupants with clubs. Yugoslav troops turned on the crowd, causing a panicked stampede. A man who defied the troops was smashed twice in the head with a rifle butt and kicked when he fell. German soldiers raced between the Yugoslav troops and ethnic Albanian civilians, creating a standoff that ended when a German army major carrying only a holstered pistol angrily approached the Yugoslav riflemen and batted aside the muzzles of their guns.

Finally came the shooting. At dusk, two Serbs in civilian clothes opened fire on German troops from a passing car near the city center. As bystanders scattered, the NATO soldiers returned fire, killing the driver of the car and seriously wounding the other assailant. A German soldier was reportedly wounded, the first NATO casualty of the peacekeeping operation.

By midnight, Serb-led Yugoslav forces were reportedly looting and burning buildings on Prizren's outskirts as they began their retreat. "An army is being forced out, and another army is coming in, and of course there are emotions like hatred in this kind of period," said Brig. Gen. Helmut Gharff, chief of operations for the German contingent.

The NATO occupation of Prizren began shortly after midnight Sunday, when about 100 German soldiers arrived from Macedonia to secure the city for the arrival of another 600 troops that entered this afternoon from Albania, 10 miles west of here. Early in the afternoon, after about 60 Yugoslav soldiers withdrew from the border crossing at Vrbnica, an angry and exuberant crowd of ethnic Albanians ransacked the post, breaking windows, stealing furniture and setting fire to guard uniforms.

About 500 more German troops are to arrive here Monday, military officials said. In all, about 5,000 German troops will be stationed in the area of Prizren, a hillside town of brick buildings with red tile roofs, stone bridges and mosques that is considered one of the most beautiful in Serbia, Yugoslavia's dominant republic. Under terms of the peace accord, the 3,000 Yugoslav troops and Serbian policemen in the area are to complete their pullout by Tuesday.

For ethnic Albanian residents, who said they had been hiding in basements and attics for months and had rarely ventured outside, the arrival of NATO forces seemed like salvation. Thousands jammed the streets, hugging and kissing German soldiers, posing with them for pictures and bedecking them with flowers. Some people burst into a popular song: "I will give you a promise; I will give my life for Kosovo."

"Oh, God, you have saved us!" wept Hajrie Morina, 43. "Every night I have waited at the window for the Serbs, but tonight I can sleep because I'm free."

"I have been hiding inside for 78 days in fear," said Mentor Gollpani, 24. "Today, I feel like a survivor of the Titanic."

Drita Alliqi, 23, said that just after midnight Sunday, her family heard the rumble of tanks -- a sound they had become familiar with in the past 11 weeks as they hid in their homes, emerging only between 9 a.m. and 2 p.m. each day to stand in food lines. "The children started shouting, `The Serbs are coming,' " she said. "But then we saw them, and we all screamed, `Oh my God, NATO is here!' I fainted right on the street. This was a miracle."

Tonight, Alliqi was on the street with hundreds of other ethnic Albanians. The party atmosphere in the city's old quarter contrasted sharply with the oppressive tension in Serbian neighborhoods. "It was a prison here for three months," said Alliqi. "Now we celebrate."

But many celebrants were quick to vent their anger at Serbs, screaming obscenities, kicking and hitting baggage-laden cars driven by Serbs and throwing stones at busloads of departing Yugoslav soldiers. When one soldier in a passing truck waved a rifle at jeering crowds lining the sidewalks and fired two shots in the air, he was answered -- and silenced -- by a warning burst from a machine gun atop a German armored vehicle. The crowd cheered the retort with chants of "NA-TO! NA-TO!"

"You don't know the conditions we lived in. We couldn't go onto the street . . . or the Serbs would grab us immediately," said Ferhan Rada, 27. "They have been killing and burning and stealing everything. They know what they did here, and they know now that they can never return because NATO and the USA are here."

At the edge of town this afternoon, Serbian civilians carrying automatic weapons set up a makeshift road block. German tanks and other vehicles passed through repeatedly but did not directly confront the civilians, some of whom spat at them as they passed. Some journalists were ordered out of their cars at gunpoint, and the sight of Albanian translators and cars with Albanian tags only agitated the armed civilians, who screamed obscenities and demanded that the journalists return to Albania.

In violation of NATO's military agreement with the Belgrade government, Yugoslav troops also manned a number of roadblocks within sight of German forces.

Only a few of the hundreds of thousands of Kosovo Albanians who have been refugees in Albania for weeks ventured back into their homeland today, some hitching rides with journalists. One such refugee, Shefki Batalli, 28, said he wanted to look at his family home in the southern Kosovo town of Zhur to see if his parents could return.

"I don't have words to express how happy I am," he said on entering Kosovo. He was quickly dejected, however, and visibly rattled by the sight of large numbers of Yugoslav soldiers. And he soon began asking reporters for a ride back to Albania.

"This is too frightening," he said.

CAPTION: Ethnic Albanian civilians grapple with a Yugoslav soldier in the Kosovo city of Prizren.