SAN SALVADOR, El Salvador (AP) _ A judge began the process of stripping legislative immunity from Roberto d'Aubuisson, the ultra-rightist accused by the president of ordering the assassination of Archbishop Oscar Arnulfo Romero.

Judge Alberto Zamora Perez of the Fourth Penal District Court also issued a warrant Tuesday for the arrest of Alvaro Rafael Saravia Merino, a retired army captain living in Miami, in connection with the case.

Zamora Perez is conducting the equivalent of a grand jury investigation into the death of Romero, a champion of non-violence and equal rights for the poor, who was shot while saying Sunday Mass in 1980.

Justice Minister Alfredo Samayoa told a news conference Tuesday that Zamora Perez asked the Central Electoral Commission for a copy of d'Aubuisson's credentials as a member of the National Assembly.

He said Zamora Perez will then petition the assembly, where President Jose Napoleon Duarte's Christian Democrats have a majority, to lift d'Aubuisson's immunity.

By law, a legislator in office cannot be charged with any crime. D'Aubuisson is a retired National Guard major and head of the ultra-rightist Republican Nationalist Alliance.

Samayoa said the Duarte administration probably would ask the United States for Saravia's extradition today, but he refused to give details.

U.S. officials detained Saravia on Monday for an alleged immigration violation. John K. Russell, a U.S. Justice Department spokesman in Washington, said Tuesday that the department was awaiting the expected extradition request.

Saravia entered the United States in 1985 on a now expired six-month tourist visa. Immigration officials became aware of his identity after police stopped him for a traffic violation and routinely turned his name over to the Immigration and Naturalization Service.

Duarte's announcement Monday that government investigators had broken the case coincided with the arrival of two prominent opposition leaders closely allied to leftist guerrillas. Guillermo Manuel Ungo and Ruben Zamora returned after being forced into a long exile by the 8-year-old civil war.

The Roman Catholic archbishop, a popular and controversial figure who denounced atrocities by leftist guerrillas and rightist death squads, was killed March 24, 1980, by a lone gunman who fired a single .22-caliber bullet from a rifle.

Romero, who was saying Mass in a small chapel adjoining a hospice for the terminally ill in the capital, died instantly when the bullet pierced his heart. The gunman fled.

Duarte said the man who drove the getaway car had come forward as the first witness willing to testify. The president identified him as Amado Antonio Garay and said Garay overheard a statement that d'Aubuisson had ordered the killing.

The president quoted Garay as saying he overheard Saravia tell d'Aubuisson, ''We carried out what has been planned, the killing of Monsignor Arnulfo Romero.'' He quoted Garay as saying that d'Aubuisson replied, ''You shouldn't have done it yet,'' and that Saravia responded, ''We did it because you gave us the order.''

Duarte told a news conference Monday: ''The crime against Monsignor Romero has been resolved. We know those who did it, we know who gave the order. We know who executed it. We have a composite portrait of the person who was the assassin. The case has been solved.''

D'Aubuisson said Duarte's charges were a ''well-orchestrated maneuver'' meant to bolster his government after Ungo's and Zamora's return. He denied all involvement in the assassination and said he was out of the country at the time.

Speaking to reporters Tuesday, d'Aubuisson also denied recurring allegations of his involvement with rightist death squads blamed for thousands of killings in the early years of the civil war.

''Those who have been involved in these deeds are the security forces,'' d'Aubuisson said. He said that despite the enmity between his rightist party and the leftist Democratic Revolutionary Front led by Ungo and Zamora, he might seek a meeting with them.

Ungo and Zamora said they are exploring the possibility remaining in El Salvador to lead the leftist political opposition. Ungo said Monday his front and the guerrilla fighters in the Farabundo Marti National Liberation Front had sent a proposal to Duarte to resume cease-fire negotiations with the government Dec. 5 in Mexico.

Talks on a cease-fire and other measures to bring peace under a new Central American agreement were suspended after gunmen killed a human rights activist on Oct. 26, which leftists blamed on rightist death squads.