Fairfax County officials complied with a judge's ruling after a day's delay yesterday and released the names of 12 Libyans arrested last week after occupying their country's student aid offices in McLean.

The 12 said they fear reprisals from Libyan leader Col. Muammar Qaddafi, but General District Court Judge Frank B. Perry ruled that Virginia law requires disclosure.

The judge ruled on Wednesday, but the court clerk's office, Commonwealth's Attorney Robert F. Horan and the sheriff, who runs the county jail where the Libyans are held, originally refused to disclose the names.

The officials cited uncertainties over the spellings of unfamiliar names and Horan added: "What if Qaddafi is going to ice someone?" He said that if he gave out a wrong name an innocent person might be hurt.

The 12 are charged with abducting three employes of the People's Committee for Students of the Libyan Arab Jamahiriya Inc., a private corporation that funnels government funds to Libyan students. The Dec. 22 takeover lasted for nine hours and ended peacefully. No one was harmed, but an attorney for the People's Committee said that extensive damage had been done.

The protesters claim the center is used to spy on students who oppose Qaddafi, an accusation that the organization has denied.

The students said they seized documents that prove their charges. But Fairfax prosecutor Horan said there was nothing in the documents to support the claims, prompting defense attorney defense attorney Sebastian K.D. Graber to observe: "I doubt if anyone working for the Fairfax County government is well versed in Libyan intelligence."

Graber said some of the defendants had showed him scars they said were the result of beatings they received from Libyan agents.

One of those arrested was identified by authorities as Salah H. Elbakkoush. Richard C. Shadyac, an attorney for the Libyan government, said that Elbakkoush lives in Alexandria and was on a Libyan scholarship for five years, although he no longer is receiving government aid.

Elbakkoush was one of the men who county authorities said had been involved in a three-hour takeover last year of the Libyan Mission to the United Nations.

Another defendant, Muftas S. Gorgum, has been on a scholarship since September 1980, attending the University of Southern Mississippi, and is still receiving money, according to Shadyac, who said that the committee plans to cut off funds to Gorgum.

Shadyac said that three of the others arrested had applied for Libyan scholarships and been approved. He identified them as Tariq M. Elgassier of Los Gatos, Calif., Mohamad R. Elaneizi of Milwaukee and Nagib A. Awad of Florida.

County authorities said that Awad also had been involved in the New York incident, along with Jamal M. Buzayan of Davis, Calif. and Otoman A. Mohamad of Milwaukee. Bond for those three and Elbakkoush was set at $30,000. Bond for the others was set at $15,000.

None of the Libyans were out on bond yesterday, according to Graber, who said he plans to ask the court to reduce the bond.

Fairfax records listed the other arrested demonstrators as Nabil A. Elshaari of Fairfield, Calif., Fathi M. Faituri of Florida, Shaib M. Mahmod-Agily and Ali M. Mansour of Hattiesburg, Miss. and Qusine E. Muftah of Milwaukee.