VATICAN CITY, JUNE 25 -- Pope John Paul II officially welcomed Austrian President Kurt Waldheim to the Vatican today as about 200 demonstrators, most of them Jews, shouted "shame, shame" from behind police lines on the edge of this tiny Catholic city-state.

The pope's 35-minute private audience with the controversial Austrian leader was Waldheim's first official reception abroad since he was elected president almost a year ago amid accusations that he had sought to hide an unsavory Nazi past.

The pope met with Waldheim despite worldwide criticism that the meeting would "legitimize" Waldheim internationally after western democratic leaders shunned him because of his alleged collaboration with the Nazis in the Balkans when he served as a lieutenant in the German Army.

During his election campaign last year, Waldheim, a former secretary general of the United Nations, was discovered to have sought to hide his World War II service as an intelligence aide to Wehrmacht Gen. Alexander Lohr.

Lohr, a fellow Austrian, was executed at the end of the war as a war criminal because he oversaw the deportation of Greek Jews to the Auschwitz death camp and ordered brutal reprisals against anti-Nazi Yugoslav civilians.

In their exchange of greetings before their private chat in the pope's library, neither the pope nor Waldheim referred to the controversy.

"Your activity so far in international life as a diplomat and foreign minister as well as your activity in the United Nations was always dedicated to the securing of peace among all countries," the pope from Poland, speaking in German, said to Waldheim when they met.

"Your professional life experience in this field can be of service for your highly regarded country as the highest representative of the Austrian people," the pope said.

Waldheim's formal reply was equally complimentary. Later, at his hotel in the center of Rome, the Austrian president told reporters that in the private part of his visit he and the pope had discussed the controversy.

"Yes, I talked with Pope John Paul II this morning about the accusations leveled against me, about what I am alleged to have done during the war, but in a marginal way," he said. "The pope knew from the start the problems that the visit might raise, but he insisted it take place nonetheless."

The Vatican has reacted defensively to the outcry over Waldheim's visit, insisting that it came about not at Vatican initiative, but only after six months of pressure from Waldheim's office.

After the pope visited Austria in 1983 he had extended an open invitation to the Austrian head of state -- not Waldheim, at that time -- to pay a return official visit to the Vatican.

After Waldheim's election and his ostracism by western leaders, Austria pressed the Vatican to honor the standing invitation.

When the Vatican announced last week that the visit would take place, Vatican officials said the pope welcomes all comers as a matter of course and had to greet Waldheim as the freely elected leader of a Catholic democratic state, against whom no allegations had been proved.

The disapproval of the international community was manifested today during the normally routine presentation of the official visitor to the Vatican diplomatic corps.

When Waldheim was escorted into the salon where diplomatic meetings are held, the ambassadors of the United States, West Germany, Britain, Italy, Belgium, the Netherlands and Argentina were conspicuously absent.

As Waldheim left St. Peter's Basilica along a red carpet extending from the main portal after today's audience, protesters several hundred feet away displayed a mock hangman's scaffold and signs bearing the names of Nazi concentration camps.

Among the demonstrators was Beate Klarsfeld, the Berlin-born Nazi hunter who was detained by Italian police for almost four hours last night, along with four U.S. Jewish activists, after a smoke bomb that they planned to use in today's demonstration went off accidentally in her hotel room.

""We will demonstrate against this outrageous whitewash of the war criminal Waldheim at every opportunity we get," Klarsfeld said as she stood with Italian survivors of Hitler's death camps.

The demonstration appeared to be a minor irritant for the Vatican. A police line sealed off St. Peter's Square for 4 1/2 hours and kept the protesters far from the pope's apartments.