ROME — The courtroom is a converted gymnasium and the star witness interrupts his testimony to declare he is Jesus Christ. But no matter how bizarre the proceedings, the outcome could change the course of East-West relations.

In what Italian newspapers call ''the trial of the century,'' an Italian court is seeking to determine whether Mehmet Ali Agca speaks the truth when he says the Soviet Union ordered him to kill Pope John Paul II.

The Kremlin has denounced the proceedings as ''a disgraceful legal farce in which perjury, slander and mystic ravings are piled up.'' The Vatican has said almost nothing.

So far there have been 19 court sessions spread over five weeks. The 27- year-old Turkish terrorist, a defendant as well as a witness, has testified at 15 of them. His evidence often has been confusing and contradictory.

''The order to kill the pope started from the Soviet embassy in Sofia,'' Agca told the court at one point. ''I am Jesus Christ reincarnated,'' he said at another.

Italian authorities have no intention of halting the proceedings because of Agca's ravings. He has been ruled sane, and prosecutor Antonio Marini says it appears he goes into his ''crazy act'' in order to avoid answering awkward questions.

''Above all he wants to save his Turkish accomplices,'' Marini said.

Already serving a life sentence for shooting and wounding the Polish pope May 13, 1981, during a general audience in St. Peter's Square, Agca is on trial a second time with seven other Turks and Bulgarians accused of plotting to assassinate John Paul on orders from Moscow.

Judge Severino Santiapichi, a blunt-spoken Sicilian who presided at Agca's first trial in July 1981 and pushed for further investigation into the case, is methodically working his way through a 1,243-page indictment that took more than two years to prepare.

Session after session was devoted to examination of blowups and color slides of photographs taken by pilgrims at the papal audience just before and after Agca fired.

A key photograph shows a swarthy young man staring at two others who might be Agca and a second gunman, Oral Celik, 25, while everyone else looks at the pope.

After three days of painstaking questioning, Agca told the court: ''Yes, there was a third person.'' He said he knew him only as Akif.

Three days later he identified Akif as fellow Gray Wolves terrorist Omer Ay, whom he said previously he had never met.

Then, under Santiapichi's sometimes exasperated but always methodical interrogation, Agca began to change other details of his story to include Ay, 33, who is serving a life sentence in Turkey for assassinating a politician.

Ay, he said, rented a car in Munich and drove to Milan May 9, 1981, to meet him and Celik and take them to Rome. On May 13 they drove the car to the Vatican and left it near St. Peter's Square with the key in the ignition in case they needed it for their getaway after Agca killed the pope.

''How much truth are you telling, Agca?'' the white-haired judge asked sharply, leaning forward and swinging his glasses in irritation.

Agca previously had always said he and Celik went to the Vatican in a car driven by Bulgarian airline official Sergei Ivanov Antonov and that Antonov waited in a getaway car.

The court usually sits Monday through Thursday mornings in a cavernous marble gymnasium that was part of Fascist dictator Benito Mussolini's Foro Italico sports center.

Cages with white steel bars line one side of the heavily guarded room. Antonov sits in one. Witnesses testify from a plastic schoolroom chair facing the bar. There, Santiapichi, in a black robe, is flanked by six jurors wearing sashes in the Italian colors of red, white and green across their chests.

Bulgarian diplomats sit at a long table listening to a translation of the proceedings. Bulgarian journalists take up part of another table.

The trial is expected to continue through July, then recess for six weeks and resume in mid-September.