A gunman shot to death a leading moderate of the Palestine Liberation Organization today at an international socialist conference here where he had come to advocate dialogue between Arabs and Israelis.

A Palestinian group led by Abu Nidal, an extremist who broke away from the PLO on grounds that it was too conservative, issued a statement in Damascus, Syria, claiming responsibility for the shooting. The PLO blamed Israeli agents, while the Israeli government denied the charge and expressed regret that so many Arab moderates have been assassinated in recent years. Details on Page A18.

Eyewitnesses said that the assailant pumped five bullets at close range into the head and chest of Issam Sartawi, the PLO's representative to Western Europe, in the crowded lobby of the hotel where he was attending the 16th congress of the Socialist International.

Late today, police in Lisbon said that a man described as carrying a Moroccan passport was detained in connection with the shooting. They refused to give further details, but a statement was expected Monday.

Sartawi, 48, who was a heart surgeon before he adopted the career of a Palestinian militant, was the highest-ranking PLO official to advocate the recognition of Israel. A key PLO mediator, he helped to arrange meetings between Arafat and Israeli leftists. He also maintained contacts with western leaders including Austrian Chancellor Bruno Kreisky, former West German chancellor Willy Brandt and the late former French prime minister Pierre Mendes-France.

The radical Abu Nidal group rejects recognition of Israel or any form of talks with it. In addition to killing other Palestinian moderates in recent years, it claimed responsibility for the attempted assassination of Israeli ambassador to London Shlomo Argov in June.

The gunman was described as tall and athletic-looking with Mediterranean or Middle Eastern features. He walked up to Sartawi at the hotel reception desk where he was talking with his secretary Anwar Abu Eisheh early in the morning and opened fire.

Police said that Sartawi died instantly, slumping in a pool of blood at the feet of stunned vacationers and congress delegates in this holiday resort on Portugal's southern coast.

Abu Eisheh was wounded in the thigh in the attack and was recovering after surgery in a nearby hospital. Doctors expected him to be released Monday.

Portuguese national guardsmen chased the attacker and fired at him, but he escaped by running through an area of vacation homes outside the hotel. As he fled, he brandished the pistol above his head.

Sources close to the congress were critical of what they called lax security. Congress host Mario Soares, leader of the Portuguese Socialist Party, reportedly ordered his own security team to arrange protection for Abu Eisheh at the hospital.

A local news agency quoted police sources as identifying the detained man as 26-year-old Youssef Awat. The report said that he was carrying a passport issued in Casablanca that police believed to be false.

Prominent socialist leaders from all over the world, including Brandt and Spanish Prime Minister Felipe Gonzalez, were gathered at the Hotel Montechoro for the final day of the four-day congress.

The Socialist International Bureau was meeting behind locked doors in the congress hall only a hundred yards from the scene of the shooting. It was preparing final resolutions that included a call for direct talks between Jordan, Israel and the Palestinians.

Sartawi's presence at the congress sparked controversy among the delegates from 50 socialist parties and related organizations. Israeli Labor Party leader Shimon Peres protested attendance by a PLO representative and succeeded in blocking Sartawi from being allowed to speak.

Despite Peres' objections, Sartawi was allowed to attend as an observer. He affirmed that he was there as an official PLO representative as the result of an invitation that the organization "had been pleased to accept."

After the slaying, Peres told the congress: "The target of the assailant was peace and understanding. As a human being and as a socialist, I cannot help but condemn any act of violence of this kind."

Other figues at the congress also added their tributes. Brandt said: "His death makes us redouble our efforts to avoid other people being killed in the Middle East."

[President Reagan, commenting in Washington on Sartawi's assassination, said: "That's always a tragedy, something of that kind. And it's indicative of the kind of violence we're trying to eradicate."]