The trial of three Bulgarians and five Turks accused of plotting to murder Pope John Paul II opened here today, interrupted briefly by an outburst from the pope's would-be assassin.

"I am Jesus Christ. In the name of the omnipotent God, I announce the end of the world. The world will be destroyed," shouted the 27-year-old Turkish gunman, Mehmet Ali Agca, to journalists and photographers crowding around the metal cage where he was being held.

Agca's remarks were dismissed by prosecutor Antonio Marini later as "stupidities directed at journalists" but were described by Luigi Consolo, a lawyer for the accused Bulgarians, as evidence that the Turkish gunman was "psychologically unbalanced."

Giving evidence later in this second trial, Agca said he wanted to underline that he was "completely sane" despite his earlier boast to journalists about being "Jesus Christ." He said he was determined to tell the truth about the assassination attempt, which he described as "the greatest tragedy in the history of mankind."

The court case has been dubbed the trial of the century by the Italian press because of its implications for East-West relations. The prosecution case is that the assassination attempt was mounted by the Soviet Bloc in an attempt to eliminate a man perceived as a major figure in social and political upheavals in Poland, the pope's native land.

Only four of the eight defendants, including Agca, were in the crowded courtroom, a converted gymnasium on the outskirts of Rome previously used for a succession of major Italian terrorist trials. In this trial Agca faces charges of bringing a firearm into Italy.

The remaining four defendants are either in Bulgaria or in hiding.

In an address to the court, Marini asked for extradition of suspected Turkish extremists in West Germany, France, the Netherlands, and Switzerland with connections to the previously convicted Agca.

These Turks, sought for purposes of testimony, included Samat Aslan, who was arrested May 14 by Dutch police during a papal visit while in possession of a revolver similar to that used by Agca in the May 1981 assassination attempt in Rome.

Most of today's opening session was taken up with procedural arguments between defense and prosecution lawyers over whether two of the accused, who were formerly employes of the Bulgarian Embassy here, were entitled to diplomatic immunity. The court postponed a definitive ruling until later in the trial.

Agca, a right-wing Turkish terrorist who was arrested by Italian police on May 13, 1981, soon after firing shots at the pope, seemed relaxed and confident as he was led into one of six cages lining one side of the large courtroom. A hint of a smile played across his drawn face as he looked out through the white bars at a throng of journalists from all over the world.

Agca, who insisted on speaking in the Italian he learned in prison, despite the presence of a Turkish interpreter, was interrupted by Judge Severino Santiapichi, who told him: "I am running this trial, not you."

In the cage next to the Turkish gunman sat Sergei I. Antonov, 37, the former deputy director of the Bulgarian state airline Balkanair in Rome, who was arrested in November 1982 on charges of complicity in the plot. In testimony to Italian investigating magistrates, Agca accused Antonov of being the driver of a getaway car.

Antonov, who has denied ever meeting Agca or having anything to do with the plot to kill the pope, appeared thin and haggard. He was almost expressionless as he listened to the lengthy submissions of the defense and prosecution lawyers.

Also in court was Musa Serdar Celebi, 33, leader of a right-wing Turkish emigre organization in West Germany accused of providing logistical assistance to Agca in the months leading up to the assassination attempt.

The fourth cage was occupied by Omer Bagci, 39, a member of Turkish Gray Wolves extremists who is alleged to have smuggled the Browning automatic pistol used by Agca into Italy.

Italian lawyers say the trial could last up to a year -- with 123 witnesses already slated for interrogation. The prosecution case against the Bulgarians depends largely on the credibility of Agca, who has changed his story repeatedly while under interrogation.

The prosecution is expected to argue that Agca has succeeded in demonstrating that he had personal dealings with Antonov and the other two Bulgarians because he was able to provide his interrogators with accurate details of their apartment layouts, movements, and personal characteristics.

The defense contends that Agca must have been fed the details while in prison by people with an interest in linking the Soviet Bloc to the papal plot.

Agca's unpredictable character -- which was typified by today's exchange with reporters -- has led both sides to conclude that fresh surprises could be in store.

At the first trial in July 1981, which lasted only three days, Agca maintained that he had acted alone in shooting at the pope. He began implicating the Bulgarian secret services in May 1982 -- and in November of that year picked out three alleged Bulgarian accomplices from an album of 56 possible Bulgarian suspects shown to him by the investigating magistrates.

Of the three Bulgarian suspects, Antonov was the only one who could be arrested in Rome. Bulgarian Embassy treasurer Todor S. Aivazov and assistant military attache Zhelyo K. Vasilev, returned to Bulgaria in the summer of 1982.

Italian lawyers representing Aivazov and Vasilev insisted that their clients could not be considered defendants in the trial on the grounds of their diplomatic status at the time of the assassination attempt. Prosecutor Marini argued, however, that diplomatic immunity applied only to acts committed in an official embassy capacity.

The dispute was resolved by the presiding judge, who said that it would only become clear if Aivazov and Vasilev were acting in an official capacity during the trial. He ordered that the two Bulgarians should continue to be considered as defendants for the time being.

The judge also turned down a request from the lawyer of Anne Odre, an American nun wounded at the same time as the pope, for the trial to be delayed so that she could take part as an interested civil party.

Among the witnesses whose presence is being demanded by the prosecutor is Abdullah Catli, a Turkish Gray Wolf arrested in Paris last October on drug-smuggling charges. Catli is suspected of helping to forge passports that Agca used.

Prosecutor Marini also told the court that it should ask West German authorities for the extradition of Yalcin Ozbey, an associate of Agca in Turkey. Agca has accused Ozbey of murdering prominent Turkish liberal journalist Abdi Ipekci in February 1979, a crime to which Agca originally confessed.

Marini told the court that he had judicial "information" from West Germany indicating that Ozbey had confessed to the murder of the Turkish newspaper editor.