The grand jurors strolled into the courthouse for their regular Wednesday morning session in a spirit of conviviality, carrying covered dishes for their lunch in shopping bags and trading small talk.

The six District government officials who arrived a few minutes later, accompanied by two lawyers for the city, appeared to be in a more somber mood. Four of them headed down the corridor to grand jury Room 3 to answer questions about whether city funds were used to pay Mayor Marion Barry's personal expenses.

Two others were directed to grand jury Room 2 where the jurors were looking into whether David E. Rivers, secretary for the District and former head of the city's Department of Human Services, steered contracts to his friends.

This scene two weeks ago on the third floor of the U.S. District Courthouse has recurred throughout the summer as prosecutors present evidence from an increasingly complex series of probes into allegations of corruption in the District government. The almost daily activity of the past few months is expected to continue for many months, with no indictments of major figures imminent.

Since the FBI last May raided the homes or offices of two city contractors, a city official and an associate of Barry's, the massive scope of the investigations has become clear. The probes encompass nearly every major city agency, virtually every member of the mayor's cabinet, a number of Barry's associates outside the government and numerous city contractors, sources have said.

One source close to the federal investigation described it as "the most intensive attack on public corruption this city has ever seen."

Under intense scrutiny, Barry has alternately derided the investigations as a "Mickey Mouse kind of operation" and tarred them as a racially motivated assault on his predominantly black administration. As the mayor frequently notes, he is not a formal target of the investigation, but no one disputes that he is at the center of the storm.

Federal investigators are pursuing the theory of an organized network of people inside and outside the District government who allegedly have conspired to defraud the government, mainly through the contracting process.

Investigators also are trying to show that these people have obstructed justice in an effort to protect their allegedly criminal enterprise in various ways, including buying the silence of convicted cocaine dealer Karen K. Johnson and attempting to buy information about the investigation from FBI clerical workers.

The main line of inquiry appears to be allegations of favoritism toward selected contractors, including alleged kickbacks to at least one city official and to a contractor acting as a middleman.

Prosecutors also are focusing on discretionary accounts set aside for Barry's use in connection with his official duties, and funds used in connection with the mayor's police security detail.

In addition, a similar official discretionary account used by Robert L. Green during his tenure as head of the University of the District of Columbia is under scrutiny, as is the selection of investment banking firms to underwrite the city's bonds. Green has denied any misuse of funds.

In a separate investigation that came to light this week, the FBI is looking into whether some police officers have kept drugs and money seized from drug suspects and falsified official reports to cover it up, sources have said. This investigation is being conducted by a division of the FBI's Washington field office that is not involved in the main corruption probe.

According to sources, three separate grand juries have issued nearly 40 subpoenas to the city government for documents or witnesses since May. The analysis of truckloads of documents is believed to be occupying much of the investigators' time.

Witnesses, called by at least 10 prosecutors, have testified on certain areas under investigation, but not on others.

For example, Karen Johnson has not yet testified, though in numerous meetings with prosecutors she has detailed an alleged scheme to buy her silence, sources have said.

Prosecutors are using the grand jury in part to compel testimony from individuals who would not otherwise cooperate, including former deputy mayor for finance Alphonse G. Hill, who pleaded guilty in May to income tax evasion and to defrauding the District government by steering contracts.

City officials say they believe that, of the many matters under investigation, the inquiry into the mayor's discretionary accounts and security detail spending is nearest to completion. Of the roughly 40 to 50 witnesses who have testified before the grand juries, about a third have been questioned about the use of these funds.

Barry said in a recent interview that prosecutors are focusing on how other city officials handled the money, not on him directly. But according to several sources, witnesses before the grand jury have been asked whether city officials have used those funds to cover personal expenses of the mayor or of his wife Effi. According to one source, several thousand dollars from the mayor's ceremonial fund is unaccounted for.

City officials say there was no requirement to keep detailed records of expenditures from the fund. They also say that while some expenditures may prove embarrassing to the government, none were illegal.

The discretionary accounts include a ceremonial fund that currently amounts to $17,500 and a second fund that amounts to $2,500 a year. The ceremonial fund will be raised to $50,000 beginning Oct. 1 and be shared by D.C. council members.

Those who have testified about the use of such funds thus far are former city administrator Elijah B. Rogers and George Thomas, who took over as controller in the mayor's office a year ago. His predecessor, Robert Robinson, was transferred out of the mayor's office after a city review found he had failed to maintain adequate records of the mayor's travel expenses.

Sources said Green, who was called before the grand jury earlier this month, may also have testified about the use of funds from the mayor's $2,500 discretionary account.

The investigation of the award of District contracts appears to be in less advanced than the inquiry into the mayor's office accounts. At least five prosecutors are pursuing the award of contracts.

According to one source, prosecutors and FBI agents are attempting to interview everyone in the District government "who ever knew David Rivers." Rivers, along with D.C. contractor John B. Clyburn and developer T. Conrad Monts, is a pivotal player in the contracting probe. Authorities said in search warrants that they have cause to believe that Clyburn and Monts may have committed crimes ranging from racketeering and mail fraud to bribery. Rivers, Clyburn and Monts have denied any wrongdoing.

Sources have said prosecutors are attempting to determine whether Rivers, who is now on leave from his city post, steered contracts to a firm set up by an undercover FBI agent in return for benefits.

Investigators are attempting to determine whether Clyburn acted as a middleman, helping obtain contracts for other firms in return for subcontracts, sources said. Sources said most of the contracts subpoenaed from the city involved Clyburn or his close associates as prime contractors or subcontractors. The subpoenaed contracts were awarded by the departments of corrections, human services, public works and employment services, among others.

The FBI is investigating whether Rogers, who left his post as city administrator in 1983 to work for the accounting firm of Grant Thornton, has also acted as a middleman. The grand jury has been collecting testimony on the award of contracts to OAO Services, a computer firm that sources said hired Grant Thornton. Rogers has denied any wrongdoing.

The use of contract funds to funnel money to city officials has been a dominant theme in early prosecutions of Barry administration officials. Former deputy mayor Ivanhoe Donaldson, who pleaded guilty in December 1985 to defrauding the government of $190,000, was able to persuade contractors to inflate their contract prices and give the added amount to him.

In the fraud and tax case against Alphonse Hill, prosecutors declared that Hill engineered the formation of a minority-owned accounting firm and then directed city contracts or subcontracts to the company, expecting business referrals from it after he left the government.

One figure in the probes, Clyburn, crosses over from the current contracting leg of the investigation to the obstruction of justice inquiry. Karen Johnson, who had a two-year personal relationship with Barry, has told federal prosecutors that she received $20,000 to $25,000 in exchange for her refusal to testify before a federal grand jury investigating alleged drug use by Barry and others, according to sources.

Sources said Johnson has said she received some money directly from Clyburn and believes that Roy Littlejohn, another prominent D.C. contractor, also provided funds. Sources have said that Clyburn has acknowledged giving her money out of sympathy for her plight and that Littlejohn channeled money to her through Clyburn.

Both men have denied the funds were hush money.

Another aspect of the obstruction of justice inquiry focuses on the city's hiring of a private security firm to sweep for electronic bugging devices that may have been planted at Barry's campaign headquarters or at the homes of several Cabinet officers.

Investigators are also probing allegations that associates of Barry's tried to buy information about the ongoing federal probe from FBI clerical workers.

Last week, an FBI clerk resigned after the FBI conducted an internal investigation.Staff writer Tom Sherwood contributed to this report.