A Fairfax County judge ruled yesterday that the names of the 12 Libyans who were arrested after occupying a McLean office building last week must be made public despite their assertions that they fear reprisals from Libyan leader Col. Muammar Qaddafi.

Despite the ruling, county officials refused to disclose the names.

The criminal court clerk's office said "all information relating to the Libyans must go through" Commonwealth's Attorney Robert F. Horan.

Prosecutor Horan then refused to release the names he had, saying he was not certain his list was accurate and that such information must come from the clerk's office.

"What I have is not public record," said Horan, adding that the names are long and foreign and he might have incorrect spellings.

"What if Qaddafi is going to ice someone?" asked Horan. He said if he gave out a wrong name, an innocent bystander might get hurt. "I have no way of knowing if what these people the Libyans involved in the takeover are saying is correct or incorrect."

The county jail said late yesterday afternoon it would release the names after getting official confirmation of the judge's order. But last night Sheriff M. Wayne Huggins, who runs the jail, also declined to give out the information. He explained that after conferring with Horan's office he determined that some of the names he had were slightly different from those on the official court record.

The 12 men who occupied the offices of the People's Committee for Students of Libyan Arab Jamahiriya Inc. for nine hours Dec. 22 gave identifying information to county authorities over the weekend.

But they asked authorities not to release their names, arguing that disclosure could imperil them and their families.

The men claimed that the McLean office, which channels Libyan government funds to students, was used by the Libyan government to spy on and harass opponents of Qaddafi, a charge the organization denies.

In speeches over the last three years, Qaddafi has called for the "liquidation" of antigovernment Libyans living abroad. In October he threatened to send "hit squads" overseas, according to a news account.

In court yesterday, Horan argued against keeping the names private. He said he had yet to see "hard evidence" that the defendants' lives were in danger.

"I've read everything about Qaddafi. But this court needs evidence, not a legend," before deciding to keep secret such information, he said.

Horan said the court had no authority under state law to withhold the names of the Libyans, which he said "are part and parcel of the public record."

Sebastian K. D. Graber, an attorney representing the anti-Qaddafi Libyans, said the men had to break into the offices to get certain documents because they felt their lives were in danger.

They "were acting as much in self-defense as if someone was holding a gun to their head," he said.

In ruling that the names must be made public, Fairfax General District Judge Frank B. Perry said that when an individual "goes out and pursues a certain course of conduct" he must be willing to suffer "the natural and probable consequences of his act."

Perry said if individuals wish to protest, those activities "have to be pursued within the parameters of the law."

The protesters are charged with abducting three People's Committee employes, whom they held for about five minutes, according to police. Four of the men were involved in last year's three-hour seizure of the Libyan Mission at the United Nations, and their bond was set at $30,000. Bond for the other eight was set at $15,000. In the New York case, the court agreed to withhold the names of the Libyan protesters.

Graber said the Libyan protesters told him that they had documents proving their claims, which they turned over to authorities. Horan replied that he had someone "versed in Arabic" review the material and there was "nothing in the documents which showed that a hit squad was being run out of McLean."