Pope John Paul II, saying he had traveled to Argentina as a "father in faith with his children in pain," called on the nation and its military junta today to "heal the wounds of war" and search for peace with Britain in the South Atlantic.

In Buenos Aires, where he met the ruling junta, and in an afternoon mass at the national religious shrine of Lujan, John Paul found the theme of the first papal visit to Argentina in "the absurd and always unjust phenomenon of war" and the need to "firmly follow paths of understanding, of concord and of peace."

The pope was answered by the cheers of hundreds of thousands of Argentines who stood along roadsides or gathered at cathedrals in Lujan and Buenos Aires during a day of blustery cold winds, driving rain and occasional patches of sunshine.

Military spokesmen continued through the day to issue reports on the standoff between British and Argentine troops around the Falkland Islands capital of Stanley, and a distinctly nationalistic tone pervaded both the crowds and the government's management of the day's events.

But John Paul firmly stressed that his quickly arranged 32-hour tour of Argentina "was above all political intent," and most of those who gathered to hear him in this overwhelmingly Roman Catholic country came peacefully and listened in relative quiet to his messages.

Both government and civilian leaders have sought to use the pope's visit as a rallying point for the fervent patriotism that has bolstered the military's increasingly costly effort to occupy the island territories Argentina has claimed for 149 years.

But the pontiff stuck strictly to an impartial message of peace, while cautioning against the excesses of nationalism. He also invoked the need for Argentina to solve its internal strife after 10 years of violent turmoil and six years of military rule.

"We all know the tensions and the wounds that have left their mark, aggravated by recent events, in Argentine society," John Paul said this morning to representatives of Argentina's Catholic Church, which itself has been divided over issues of human rights and support for military rule. "And we all have to try to overcome them as soon as possible."

The pope arrived at Buenos Aires Metropolitan Cathedral this morning for his third pastoral visit in Latin America after riding into the city along a 20-mile route from Ezeiza Airport.

The airport highway and the broad avenues leading to the city's central Plaza de Mayo were lined with thousands of people.

Clutching rosaries, crucifixes and Argentine flags, they had waited hours to throw flowers at the car in which John Paul rode.

After delivering messages at both the airport and the cathedral, he mounted a special, plexiglass-encased stand on the rear of a converted pickup truck and rode around the broad Plaza del Mayo to the pink stone presidential palace.

There, President Leopoldo Galtieri and the two other members of the ruling junta awaited him for a ceremonial meeting linked by Vatican officials to the pope's meeting with Queen Elizabeth II earlier this month during his tour of Britain.

The pope talked privately with the junta's leaders for less than 20 minutes. A cheerful crowd outside sang the national anthem and chanted appeals for John Paul to appear on the palace balcony, where Argentine leaders traditionally have addressed rallies.

At last the pontiff stood at a parapet draped with Argentine flags and, with members of the junta watching silently behind him, blessed the crowd as they chanted his name and waved flags that mixed papal yellow with Argentine blue.

After lunch at the Papal Nuncio's residence, the pope rode his specially designed car to the northern end of Buenos Aires, then took the ceremonial presidential train 30 miles to Lujan, where Argentine Catholics make annual pilgrimages.

Among some 200,000 waiting for him at Lujan were priests, pilgrims from around Argentina, and workers from Buenos Aires' industrial belt who had been brought there in buses by labor leaders who have linked the pope to the nation's populist Peronist movement.

Many had camped for 13 hours in the mud to attend tonight's mass, and when the pope's car appeared on the wide avenue leading to the plaza, dozens of the faithful, overcome by emotion, the cold and the long wait, fainted or became hysterical.

A grim-looking John Paul followed the liturgy with intense concentration, leaning his body into his prayers and shutting his eyes.

The crowd was somber when the pope concluded his sermon.

At his morning address at Ezeiza and at the cathedral, the pope bitterly described the dangers of the wars in the Falklands and elsewhere around the world, and aligned himself with the soldiers and families who had suffered.

"I have come to pray for all of those who have lost their lives," he said in the Buenos Aires cathedral as a silent crowd listened to loudspeakers outside. "I pray for the families that suffer, as I did in the same way in Great Britain."

"We are not facing terrifying spectacles like those of Hiroshima and Nagasaki," John Paul said in his greeting address at Ezeiza. "But every time that we risk a man's life we set off the mechanisms that lead to these catastrophes, we take dangerous, regressive and anti-human paths."

The pope's message was cheered by the crowd that waited in the Plaza del Mayo and at Ezeiza, but there was little sign of support for a peace with Britain that would mean an end to Argentina's hold on the Falklands.

"Peace with dignity," was the slogan emblazoned on banners and placards in Lujan and, in Buenos Aires, one banner read: "May God bless our just war." Dozens accepted the pope's words with the reservation that peace must mean Argentine sovereignty in the South Atlantic.

"Don't say 'Stop the fighting,' say, 'Defend what is ours,' " said one high school student from the industrial city of Rosario who waited for the pope at Lujan.

On state-controlled television this afternoon, the pope's message of greeting to Argentina was replayed over films showing Argentine soldiers marching through the streets of Stanley and digging trenches.