Gunmen assassinated a prominent Egyptian newspaper editor and confidant of President Anwar Sadat here yesterday in a terrorist act apparently directed against Egypt's peace negotiations with Israel.

The two gunmen who said they were Palestinians, reportedly said that everyone involved in Sadat's trip to Jerusalem was "condemned to death."

After killing Yussuf Schai, 60, editor-in-chief of the semiofficial Cairo daily, Al Abram, the terrorists seized a dozen hostages, including several Arab officials, and negotiated a flight out of the country.

They first attempted to fly to fripoli, Libya, but Libyan authorities reportedly refused to permit their plane to land. Late last night, Lebanese air authorities said the plane was headed for South Yemen.

Sebai, who was a former Egyptian culture minister, was shot at pointblank range in the Nicosia Hilton Hotel where he was attending a meeting of the Afro-Asian Peoples Solidarity Organization, of which he was secretary-general.

Sebai was standing in the lobby of the hotel when two men approached and spoke to him, witnesses said.

The silver-haired Sebai made a move to flee, but one of the men forced him to the floor and pinned him there with his knee as the two, armed with pistols, shot him three times in the heart. Sebai died on the spot, witnesses said.

The terrorists then rounded up hostages among the Arab delegates to the Afro-Asian organization's meeting, holding police at bay with grenades. After hours of negotiations, Cypriot officials let them take off with their hostages and weapons aboard a Boeing 707 of Cyprus Airways.

Palestine Liberation Organization officials in Beirut said the PLO's chief spokesman, Abdel Mohsen Abu Maizar, was among those taken hostage. The PLO denied any responsibility for the attack and denounced it as "barbarous and brutal."

In Cairo, Sadat said Sebai was "like one of my brothers." Before the Cypriot authorities allowed the commandeered plane to leave, the Egyptian government had asked Cyprus to "reveal the nationalities and leanings of the attackers and deliver them to Egyptian authorities for trial and punishment," UPI reported.

Israeli Prime Minister Menachem Begin expressed his condolences to the Egyptian government and to Sebai's family, and used the occasion to repeat Israel's opposition to the establishment of a Palestinian state.

"There are still people who believe a state can be established to be ruled by the perpetrators of acts such as we have witnessed in Cyprus today," Begin told reporters.

Without making any public statement explaining their act, the assassins reportedly told their hostages they came to kill Sebai because he had written "pro-Israelis" articles.

As one of the Egyptian commentators closest to Sadat, Sebai accompanied him on his trip to Jerusalem and he helped orchestrate the subsequent publicly campaign ardently defending Egyptian policies and criticizing Sadat's critics. While the gunmen referred occasionally to the Palestinian cause, they appeared to be motivated principally by animosity toward Sadat.

As reported by hostages who were released before the plane left, the two men's remarks were in line with those of the rejection front of Arab groups opposed to Sadat. This front, made up of Syria, Iraq, the PLO , Algeria, Libya and South Yemen, has fueled a climate of anti-Sadat hostility that has led some extremists to threaten terrorist reprisals against Sadat's supporters.

The Egyptian embassy in Syrian-controlled West Beirut was attacked repeatedly after Sadat's trip.

Yesterday's slaying marked a new escalation of violence recalling the start of a Palestinian assassination campaign against prominent Jordanians after King Hussein drove Palestinian commando forces out of the country in "black September" 1970.

The assassination is also likely to further embitter Egyptian-Palestinian relations, which were ruptured following the first rejection front meeting in Tripoli last fall.

The Egyptian Cabinet, vhich called an emergency session, viewed the assassination as an attack on Sadat's policies.

A senior Egyptian official flew here, landing at another airport, to take home Sebai's body and the other members of the Egyptian delegation.

The Cairo government has already severed links wth the PLO, closed down their offices and radio station in Cairo, expelled several hundred Palestinians and forbidden others to enter Egypt.

Despite the PLO's efforts to dissociate itself from the killing, it will almost certainly fuel the anti-Palestinian feeling that has been spreading in Egypt.

While Sadat and the harder line Palestinian leaders like George Habash have bitterly attacked one another, Sadat and PLO Chairman Yasser Arafat have left the door ajar to personal reconciliation.

During the negotiations a Cyprus airplane flew to Beirut and brought back other PLO officials who met with Cypriot government leaders and spoke briefly to the gunmen.

In addition to the PLO spokesmen, other hostages aborad the plane when it left Cyprus were two Palestinians, four Egyptians, two Syrians, one Somali and one Canadian, according to hostages who were released. There was no further identification of those seized but they were believed to have been delegates to the Afro-Asian meeting.

Today's terrorist act has implications for the growing Palestinian presence in Cyprus, which has become a useful base since the civil war in Lebanon.

The assassination broke an unwritten pact here that permit Arabs and Israelis political freedom on Cyprus in return for agreement not to engage in terrorist acts here against one another. With the disappearance of the commanding figure of President Makarlos, who died last year, fears have been voiced here about the risk of Cyprus becoming the scene of inter-arab violence.

In handling the first terrorist action to originate in Cyprus, the Cypriot authorities created initial confusion by identifying the guerrillas as Eritreans.

Negotiations went on for nearly six hours while the terrorists held their hostages in a minibus parked beside the wing of a closed Cypriot Air Boeing.

Negotiations were conducted through Dr. Vlassos Lyssarides, the Cypriot Socialist leader who is in ardent pro-Palestinian and volunteered to become a hostage along with Cypriot Interior Minister Christodoulos Veniamin.

Hatless in the rain, Lyssarides shuttled in a battered sedan between the bus and the terminal building 200 yards away where the Cypriot cabinet had assembled in the VIP lounge to handle the crisis.

Eventually the Cypriot hostages were released and the gunmen boarded the airliner, manned by a volunteer crew, with their hostages. The Cypriot authorities abandoned their earlier insistence that the gunmen depart without weapons or hostages.

A respected, unassuming man, Sebai had been an Army officer who took part in the free officers movement that brought President Gamal Abdel Nasser to power.

This political back ground helped Sebai to cultural prominence: he was a prolific writer of books and screen-plays, but Egyptian artistic circles considered that he owed his position to his loyalty to the regime.