ALEXANDRIA, Egypt (AP) _ Four Libyan security agents on Saturday told a court they were assigned to assassinate two opponents of Libyan leader Col. Moammar Khadafy who were living in Egypt.

All four claimed at the start of their trial by a three-man criminal court in this Mediterranean city that they ''disapproved'' of the mission but could not refuse it because they feared punishment.

The prosecution is demanding death for the defendants and life imprisonment for three senior Libyan security officers, being tried in absentia, who are accused of recruiting the four agents.

Targets of the alleged assassination plots were Abdel-Hamid Bakoush, the last Libyan premier before Khadafy overthrew the monarchy in a 1969 military coup, and Mohammed el-Mokaryef, a former Cabinet-level official under Khadafy.

Egyptian officials said the operation was to have been carried out last Nov. 6 at a ranch near Alexandria.

An official indictment issued last month charged the four agents in custody with attempted murder, criminal conspiracy to kill Libyan exiles, spying for Libya, receiving payoffs to harm Egypt's national interests, illegal possession of weapons and illegal entry into Egypt.

The three defendants still at large were charged with espionage and masterminding the assassination attempt.

On trial for their lives are Sakr Abdullah Meidoun, 22; Farahat Mohammed Seddiq, 42; Youssef Negm el-Orfi, 32, and Mehrez Mohammed Omar, 32. All were arrested Nov. 6.

The indictment named the absent defendants as Abdel-Salaam el-Zadma, Abdullah el-Sinoussy and Younis Belkassem. Warrants for their arrest were issued last month.

Under questioning, the defendants said they worked for Libya's security service and had been assigned to kill Bakoush and el-Mokaryef.

''I disapproved of this assignment, but I had to go along because I was afraid of punishment,'' Siddiq told the court.

''I came here on orders to kill Bakoush and el-Mokaryef and others with them,'' Omar said. ''I had to carry out orders, although I was not convinced.''

Interior Minister Ahmed Rushdy said last Nov. 11 that Khadafy's regime had promised to pay $22.5 million to the four agents and a fifth Libyan who reported the plan to Egyptian security authorities.

Rushdy also said police had recorded and videotaped the activities of the suspected assassination team from its arrival in Egypt across the western border with Libya until its members were arrested outside the farmhouse where Bakoush and other Libyan exiles were having lunch.

At Saturday's hearing, prosecutors produced the informer as their star witness. He was identified as Mansour el-Dakhil, 42, an Egyptian-born Bedouin who obtained Libyan citizenship in 1965.

He testified that the three absent defendants had made arrangements for him to help the the assigned killers in the plot. He said the Libyans originally wanted to send a team of 32 men for the job but cut the number to four on his advice.

El-Dakhil said he reported the plan to Egyptian security on his first trip to Egypt from Libya after his recruitment, and they asked him to pretend to cooperate with the plotters.

He said the accused Libyan security officers paid him $30,000 and promised him $6 million after the assassinations were carried out.

Presiding Judge Mustafa Osman said the trial will resume Sunday and he expected it to end by Tuesday.