Henry G. Barr, a former top aide to Attorney General Richard L. Thornburgh who oversaw the Justice Department's criminal investigations, was indicted yesterday on charges that he repeatedly used cocaine over a four-year period and lied about it to receive a security clearance.

According to federal prosecutors, the four-count indictment, handed up by a federal grand jury in Harrisburg, Pa., makes Barr, 47, the highest-ranking U.S. official ever to be charged with a drug crime.

The indictment charges that Barr used cocaine at a home in Camp Hill, Pa., as late as April 8, 1989, seven months after he joined the Justice Department as Thornburgh's staff liaison with U.S. attorneys' offices, the Federal Bureau of Investigation, the Drug Enforcement Administration and other agencies. He resigned the next month, citing personal reasons.

The indictment also alleges that starting in December 1984, when he was serving as a legal counsel to then-Gov. Thornburgh in Harrisburg, Barr "repeatedly acquired" cocaine, shared it with unnamed co-conspirators and ingested the drug "using various paraphernalia, that included cocaine spoons, straws and other makeshift devices."

At the Justice Department, Barr routinely reviewed sensitive law enforcement information, including grand jury investigations of drug and espionage cases, and reported to Thornburgh on the progress of criminal cases, according to a department official. "He had access to everything," the official said.

But Barr had no "policy-making" role or any direct ability to influence the course of investigations, the official said. There are no allegations that Barr used his position to tip off drug suppliers or for any other improper purpose.

Nevertheless, the indictment was another political embarrassment for Thornburgh, who has been repeatedly criticized for his reliance on a small "inner circle" of longtime aides from Pennsylvania. Barr had been a key member of that group, having a professional relationship with Thornburgh stretching over 20 years. A 1969 graduate of Duquesne Law School, Barr served as a prosecutor in the U.S. attorney's office in Pittsburgh when Thornburgh headed the office in the mid-1970s and was his chief legal counsel during Thornburgh's second term as governor.

In a brief statement yesterday, Thornburgh called the indictment a "personal tragedy for Henry Barr, a capable lawyer who devoted many years of his career to public service." But he declined further comment, saying he had no knowledge of the facts in the case because he, along with four of his top aides and the acting U.S. attorney in Harrisburg, Jim West, had recused themselves from the case.

Barr's lawyer, Charles F. Scarlata, said his client would plead not guilty and angrily attacked the government's decision to bring the charges as "egregious."

Scarlata called the drug charges against his client "unusual," saying, "How often have you seen the federal government bring a {drug} possession case of a historical nature?"

"Here you have the guy with the keys to the kingdom doing cocaine," Gordon Zubrod, the assistant U.S. attorney handling the case, said yesterday. "We don't view this as a drug case. It's a corruption case. What do you do if you have access to secret information and the name of your supplier comes across the desk? Do you warn the supplier?

"This is a gun at the head of every agent," Zubrod added. "You can't but be compromised to that extent."

One count in the indictment charges Barr with making false statements when he filled out his Justice Department security questionnaire and said he had not used any illegal drugs in the past five years. Under a special waiver from Thornburgh, Barr received a "sensitive compartmented information" security clearance -- above top secret -- before the FBI background check was completed.

Scarlata said there has never been a prosecution for such a charge and asked Deputy Attorney General William P. Barr, who is no relation, to appoint a special prosecutor who can "fairly and objectively evaluate the government's case."

"The decision to bring the charges is particularly egregious since Mr. Barr did not seek the position but rather was asked to sacrifice his partnership in a large Harrisburg law firm, leave his family and go to Washington, D.C.," Scarlata said.

A spokesman for William P. Barr had no comment. Zubrod said the reason the government has never prosecuted a false statement charge like this one is that Justice Department officials have never before discovered such a violation.

The indictment is the latest development in a highly publicized investigation that federal officials said has revealed widespread cocaine use among white-collar professionals, including current and former public officials, in the Harrisburg area.

Zubrod said charges of cocaine distribution and possession will be filed next week against Richard L. Guida, the former director of criminal investigations in the Pennsylvania attorney general's office, and a Pennsylvania official who the prosecutor declined to identify.

The case began nearly two years ago when local police raided the home of a Harrisburg drug dealer and discovered a ledger with the names of a number of local businessmen, sources said. By last year, sources said, prosecutors had extensive allegations of drug use against Guida, a flamboyant lawyer who had resigned from the Pennsylvania attorney general's office after a radio reporter accused him of being a "cocaine addict."

Confronted with the new evidence against him, Guida then agreed to plead guilty to one count of cocaine possession and testify against his longtime friend, Henry Barr. In court papers filed last month, Guida's lawyer said his client testified that he repeatedly used cocaine with Barr over four years starting at a New Year's Eve party in 1984. He named five others with whom Barr used the drug, including Guida's law partner and a local tennis club owner who allegedly was "Barr's source of cocaine" and has pleaded guilty in the case.

But the government won permission to dissolve its plea agreement with Guida on the grounds that he had flunked an FBI polygraph when asked about another public official -- so far unnamed -- with whom he allegedly used cocaine.