A former Pennsylvania state prosecutor has provided federal prosecutors with detailed allegations of repeated cocaine use by a former top aide to Attorney General Dick Thornburgh, according to papers filed in U.S. District Court in Scranton, Pa.

The allegations against Henry G. Barr -- who until May 1989 coordinated all Justice Department criminal investigations -- are expected to form the basis for an indictment on perjury. He denied recent drug use on his Justice Department security questionnaire, according to sources familiar with the matter.

Department officials said they could not confirm a report in the Scranton Times last week that a federal grand jury in Harrisburg, Pa., could return an indictment against Barr as early as today. But sources acknowledged that an indictment is expected shortly and that Thornburgh, who has recused himself from the case, will probably release a statement about it at that time.

The case is considered especially sensitive because of Barr's long ties to Thornburgh and other top members of his staff, several of whom have been interviewed by the FBI as part of the probe.

Barr was an assistant U.S. attorney under Thornburgh in Pittsburgh in the mid-1970s and later was general counsel when Thornburgh became Pennsylvania governor. Barr also was one of a handful of close political associates who came to Washington to serve on Thornburgh's personal staff when he became attorney general in August 1988.

Neither Barr nor his lawyer, Charles Scarlata, returned telephone calls yesterday. But details of the investigation became public last week when federal prosecutors sought to terminate a plea agreement they had reached with former Pennsylvania deputy attorney general Richard Guida, one of the main witnesses in the probe, on grounds Guida had not been candid about drug use he had witnessed.

In response, Guida's lawyer, Paul J. Killion, filed an 11-page motion detailing the cooperation Guida has offered the government. "Guida informed the FBI he had used cocaine with Henry Barr, the target of this investigation, on New Year's Eve of 1984, on several occasions in . . . 1985 . . . and on a number of occasions in 1987 or early 1988," the motion stated.

Guida provided information "on Henry Barr's source of cocaine," which was a Harrisburg investment banker who pleaded guilty to one count of delivering cocaine in May, the motion said. The banker, James Diebold, "thereafter provided information concerning his knowledge of drug activites on the part of . . . Barr," the motion stated.

It added that Guida's law partner in Harrisburg, John Connelly, had been interviewed by the FBI and "freely admitted to the authorities that he had, in the past, used cocaine, and stated that on one occasion in late 1985 or early 1986, he had observed the target of this investigation, Henry Barr, use cocaine."

Gordon Zubrod, the assistant U.S. attorney who is heading the investigation, could not be reached for comment yesterday, a secretary said. Neither Connelly nor Diebold returned telephone calls.

Zubrod's boss, U.S. Attorney James West, has recused himself from the investigation because he previously worked with Guida in the Pennsylvania Justice Department. A court hearing that began Friday on whether to vacate Guida's plea is due to continue later this week.