Pope John Paul II prayed with a crowd in York today for both British and Argentine families who have lost sons in the Falklands conflict and then went to heavily Presbyterian Scotland for an enthusiastic welcome marred later by protests.

The pontiff, who has urged both sides in the Falklands conflict to accept a cease-fire, mentioned Argentina for the first time in his British tour, which almost was postponed because of criticism in Argentina.

"How can we not recall those many families in Britain and Argentina who bear the heavy weight of pain and sorrow because of the loss of loved ones in the South Atlantic?" the pope declared in York in northeastern England.

"As we ask God to comfort them in their affliction, let us pray for peace, a just and lasting peace, so that other families may be spared the suffering of war," the pontiff added. His words were greeted by loud applause from the near-capacity crowd of 150,000 at a local racetrack.

Although crowds were smaller than expected in earlier visits to Liverpool and Manchester, the pope's tour of Britain so far appears to have been a resounding success, despite the controversy stirred by his presence in a country involved in an armed conflict.

The pope's desire to see a prompt end to the Falklands conflict and his decision to balance his visit here with a tour of Argentina later this month have not drawn negative reactions from British nationalists so far.

British newspapers and television have given extensive, favorable coverage to the papal visit, although it has not been as all-embracing as in predominantly Roman Catholic countries, where normal life has seemed to come to a halt when the pope arrived. His visit also marks the first time since the eruption of the South Atlantic dispute that any other news development has been accorded equal press treatment.

This morning's issue of The Times gave the pope's Liverpool speech precedence on its front page over the capture of 1,400 Argentines by British troops in the Falklands. "Masses of Love" was the banner headline of the popular tabloid The Sun. The Daily Express headline was "Hats Off for John Paul II," and the Daily Star, another tabloid, described the pope's visit to Liverpool as "the greatest show on earth."

On the fourth day of his six-day tour of Britain, the pope today flew from Liverpool to nearby Manchester in northwestern England for an open-air mass. He later greeted the throng in York and finished the day in triumph in Edinburgh, the capital of Scotland, where he was exuberantly cheered by crowds including 45,000 young people packed into the Murrayfield rugby stadium.

Several hours later, however, the pope was confronted by more than 100 anti-Catholic demonstrators, some shouting obscenities and throwing crumpled papal souvenir posters at his motorcade when he arrived at the seat of the Church of Scotland, The Associated Press reported.

The pope was seen to bless some of the militants, including several Bible-carrying clergymen, led by Northern Ireland's Protestant firebrand, the Rev. Ian Paisley. The crowd got into a shoving match with police and well-wishers, and some arrests were reported, The AP said. Paisley was not detained.

Chanting "We love John Paul" and singing "He's Got the Whole World in his Hands," the crowd at the stadium gave the pontiff ovation after ovation, interrupting almost every sentence in his homily with loud cheers, whistles and shrieks before falling silent for prayers.

The pope's advice to the young people was that they should place their lives in the hands of Jesus, who, he said, "will make such uses of your lives as will be beyond your greatest expectations."

The pope praised the qualities of love, peacefulness, patience, trustfulness and selflessness and repeated the Apostle Paul's warning that those who practice "fornication, gross indecency and sexual irresponsibility" would not enter heaven.

In Manchester the pope participated in the ordination of 12 priests and urged young Britons to heed the call to become priests or nuns.

He was greeted by a crowd of 200,000, which was enthusiastic but much smaller than the million that Catholic leaders had hoped to see.

Officials said the relatively small turnout, which was nonetheless unprecedented here for any event, was disappointing. It was apparently due to complicated travel arrangements involving a $3.60 special bus ride and a 1 1/2-mile walk to the place of the mass, coupled with numerous warnings about possible traffic jams and road closures.

From Manchester the pope flew by helicopter to York, where he urged his listeners to defend the ties of marriage, which he described as "an unbreakable alliance of mutual self-giving" and also as "indissoluble and irrevocable."

The pope talked of marriages that broke down, of people who were raising families alone or whose marriages were affected by illness: "I praise all those who help those wounded by the breakdown of their marriage."

He asked married people in the huge crowd to reaffirm their marriage vows and denounced "the growing number of divorces, the scourge of abortion, the spread of contraception and the antilife mentality."

Centuries of British suspicion of Roman Catholicism and the papacy have been submerged in a whirl of enthusiasm for the good-natured world pastor from Poland.

This historic reconciliation on British soil was symbolized by the pope's meetings with the archbishop of Canterbury in Canterbury Cathedral, with Queen Elizabeth in Buckingham Palace and with the Anglican bishop of Liverpool, scene of decades of Protestant-Catholic bitterness this century, in the city's Anglican Cathedral last night.

The pope's ability to project the image of a virile and distinguished man of God, warm-hearted and full of good will, seems to have won the hearts of the British.