One Friday last May, U.S. Attorney Joseph E. diGenova laid some high cards on the table.

A former D.C. deputy mayor pleaded guilty to fraud; a federal court jury returned the first convictions proving a "Nigerian connection" for heroin; a former city administrator was quizzed by a federal grand jury investigating corruption, and FBI agents searched the homes and offices of some of District Mayor Marion Barry's friends and associates to climax a 17-month undercover contracting investigation.

It was a strong hand diGenova produced that day from his office's investigations of white-collar crime, public corruption and drug trafficking. Played by a prosecutor with a politician's relish for the spotlight, it underscored diGenova's ambitious crime-fighting agenda and triggered widespread speculation that he was closing in on an apparent longtime quarry, the D.C. mayor.

But nine months later, as diGenova prepares to leave office, it seems he may be remembered as much for the case he never brought against Barry as for his conspicuous successes as the top prosecutor here.

DiGenova's departure tomorrow for the Washington law firm of Bishop Cook Purcell & Reynolds brings to a close a four-year term clearly stamped by his sometimes brash, sometimes studied public persona. It also closes out a period, distinctly different in D.C. history, in which a U.S. attorney vocally targeted public corruption and touched off a political war with the city administration.

Once he appeared to set his sights on Barry, many colleagues and critics agree, the 43-year-old diGenova was destined to be graded on whether he brought an indictment against the mayor.

Failing that, he was bombarded with criticism from community leaders and Barry supporters who accuse the U.S. attorney of paralyzing the city government with reckless insinuations of widespread corruption. Barry led the offensive against him, accusing the prosecutor of leaking secret grand jury information for racist or political reasons.

D.C. Council Chairman David A. Clarke, striking a recurring theme, told a political group recently, "The city has been strung out for three years. We need a resolution."

The Rev. A. Knighton Stanley, the politically active pastor of the Peoples Congregational Church, said, "The perception is that he leaked information, or somebody in his office did with his knowledge, and that it was both politically and racially motivated. There are no doubt moments when he overstepped the strictly legal and investigative function and went into the political function."

DiGenova, not one to suffer affronts lightly, vigorously denies that. Friends say he seethes at the suggestion that he pursued a political vendetta against Barry. Numerous law enforcement officials agree that the scent of scandal around Barry's personal and professional life, in the air long before diGenova took office, made him impossible to ignore.

"The prosecutor's responsibility," diGenova said in a recent interview, "is not to take polls. We do not conduct plebiscites about law enforcement. We do not create problems. We discover them. The series of convictions in public corruption, both federal and local, speaks for itself."

That diGenova has blurred the roles of prosecutor and politician is an article of faith among many law enforcement officials. But even his most severe critics, who characterize him as an overblown publicity hound prone to rash judgments, say the record shows that prosecutorial decisions during his term were based on evidence, not politics.

Former Assistant U.S. Attorney Hank Schuelke, one of more than 50 community leaders and law enforcement professionals interviewed, cites as proof the string of nine guilty pleas from Barry administration officials since diGenova took office in December 1983. "These people are not being convicted and pleading guilty for Joe's self-aggrandizement," Schuelke said.

Major fraud cases against former D.C. deputy mayors Ivanhoe Donaldson and Alphonse G. Hill solidified diGenova's reputation as an aggressive, effective prosecutor. But the other officials who traded their D.C. offices for prison cells were much smaller fry. And several investigations, trumpeted by the media, ultimately foundered.

A probe of expenditures from Barry's office accounts resulted in the misdemeanor conviction of mayoral aide Robert B. Robinson and the acquittal of Robert L. Green, former president of the University of the District of Columbia, on theft and perjury charges. No charges have been filed against any D.C. lottery board members five years after diGenova said two of them were the focus of a contracts investigation.

DiGenova's most ambitious effort on the local front, a two-year-old probe of District government contracting and alleged hush-money payments to Barry associate Karen K. Johnson, is continuing, with no charges filed.

In any other town, such a campaign against corruption might not have drawn hundreds of protesters to the steps of city hall. But diGenova, a white Republican, took on a black Democratic government and black businessmen in a city still smarting from decades of white-imposed federal rule.

DiGenova's outspoken style, so different from his publicity-shy predecessors, added more sparks to the explosive mixture, city leaders and diGenova's subordinates agree. At well-attended news conferences, diGenova delivered a town crier's message clearly aimed at arousing action.

The conviction of Donaldson for stealing $190,000 in city funds illustrated "raw corruption" in the District government and a "corrosive attitude" among city employees, the prosecutor said. He took pains to add that it was not an isolated case. At the sentencing of another city staff member, diGenova proclaimed, "The days of wheeling, dealing and stealing in the D.C. government are over."

Some of diGenova's assistants say his sweeping statements rightly focused a public spotlight on wrongdoing; others saw them as political grandstanding or theatrics better saved for a closing appeal to a jury. They agree that his high profile invited Barry's counterattack.

"The visibility he's brought to the office is both a blessing and a curse," a former prosecutor said. "That visibility has been turned against him."

"Maybe it got out of hand," said another. "{But} it's a tough situation for a white DA in a black city with a black city government . . . . With the extent of the allegations and the type of allegations, any prosecutor would be running risks."A Talent for Showmanship

For diGenova, part showman and part politician, center stage came naturally. The son of a professional opera singer, and an amateur opera singer and actor himself, he presents a kaleidoscope of traits: charming and officious; impulsive and calculating; frenetic and composed.

In less restrained moments, his emotions come quickly to the fore and "his face says a thousand words before he says the first," said one former assistant who dealt with him frequently.

His wife, Victoria Toensing, a deputy assistant attorney general in the Justice Department, became quickly acquainted with his impulsive side. When he met her demonstrating outside at the Republican National Convention in 1980, he promptly offered her $90 for all 30 of her Equal Rights Amendment buttons. On the second date, he proposed.

As a new assistant prosecutor at the U.S. attorney's office in 1972, diGenova delighted his colleagues with his devilish imitations of judges before whom they practiced while impressing them with his courtroom skills. He left after the required three-year commitment, enticed by politics.

He perfected an action-oriented, get-to-the-point style of management serving in various positions for then-Sen. Charles McC. Mathias Jr. (R-Md.). In 1982, with the backing of friendly senators, he was named principal assistant to U.S. Attorney Stanley S. Harris.

DiGenova's political connections on Capitol Hill and in the Justice Department came in handy when he rose to the top post in December 1983 and went after a new office building and more staff. Although it underlined the view of him as a political operator, DiGenova made no apologies for wining and dining senators at his home.

"Politics is not a dirty word or a dirty subject," he said in a 1985 interview. "I'm not ashamed of it. This is a town where politics is a craft, it's a commodity, it's part of the practice of law."

His strengths as U.S. attorney, many colleagues agree, were his courage in the pursuit of public corruption and his skills as a manager, especially in marshaling resources and making decisions quickly.

"This office has done some of the most complex and significant cases that it has handled in the 13 years I've been here, and I think it's due to Joe's leadership in large measure," said Stephen R. Spivack, who recently resigned after heading the special prosecutions unit for four years. "If he hadn't given us the support that he gave us in staffing, there would not have been as many successful prosecutions."

Associate Attorney General Stephen S. Trott, a friend and superior, said he knew that diGenova was the type to "step up to the plate" in 1984 when he turned down Trott's offer to have the Justice Department's public integrity section take over all public corruption cases.

"He looked at me and put his fist on the table and said, 'I'm the U.S. attorney in Washington, and if there is corruption in Washington, I can take care of it,' " Trott said.

The U.S. attorney comes in for a dressing-down, however, from current and former assistants who say that he lacked the judgment and the expertise to help shape cases, had to be reined in by more deliberative midlevel supervisors under him, and appointed cronies to top management posts.

"Joe feels very strongly about management and paper flow," said one former prosecutor. "He's not that substantive."

For advice on critical legal issues, several former assistants said, they went to their colleagues, rather than to diGenova. Some also avoided Timothy J. Reardon III, a law school friend of diGenova's who became his top assistant, because they felt that Reardon was not serious enough about his job. DiGenova, who praises Reardon as a top-notch lawyer, has recommended him as his successor.

DiGenova's detractors often contrast him with Earl J. Silbert, who served as U.S. attorney from 1974 to 1979 and is almost universally praised by his former assistants. Silbert was criticized as an assistant prosecutor for not aggressively pursuing leads indicating a high-level cover-up of the Watergate bugging.

"Earl was very substantive, and Earl did get involved in critical decisions in cases," said a former assistant who served under both men. "I know Joe will always resent people saying that, but Earl was very thoughtful. That's not a word that comes to mind with Joe."

A number of critics say diGenova obscured what they see as his lack of substance by siphoning credit from deserving courtroom prosecutors. While diGenova took the televised curtain calls, key aides snickered at his image on the evening news -- a scenario that is not unusual in the offices of big-city prosecutors.

One former assistant recalled diGenova's surprise appearance in the courtroom at the sentencing of Cornell Jones, who in the early 1980s reigned as the cocaine lord of the Hanover Place NW open drug market. Though he played no role in the case to that point, diGenova read a subordinate's prepared argument for a tough sentence and was prominently quoted in the media the next day, the former assistant said. Corruption Probes to Continue

With his departure now at hand, diGenova says he is not central to the investigations he spearheaded, especially the sensitive continuing corruption probes of the District government. "The investigations do not depend on me," he said. "They are run by career prosecutors. We have a very deep bench."

The U.S. attorney's office, the nation's largest with 204 lawyers and the only one that handles both local and federal criminal cases, has shifted its focus in recent years from local offenses to long-term investigations of federal crime. DiGenova's style reinforced that shift.

DiGenova credits Harris, his predecessor, with the key decision to free a group of prosecutors from the routine burdens of bank robberies and stolen check schemes to handle the long-term inquiries. But diGenova helped form the "special prosecutions" unit of 19 veteran prosecutors, supported them in the pursuit of tough cases and encouraged them to step up wiretapping.

Fifteen months after its creation, the new unit yielded the first major success: a guilty plea to obstruction of justice from former deputy defense secretary Paul Thayer and his Texas stockbroker, Billy Bob Harris, for their roles in a scheme to block a Securities and Exchange Commission investigation of insider trading.

That case was followed by the successful prosecution of Donaldson; Hill, who was imprisoned for six to 24 months for defrauding the government and tax evasion; former vice chairman of the Postal Service Board of Governors Peter J. Voss, and convicted spy for Israel Jonathan Jay Pollard and his wife Anne Henderson-Pollard.

A separate section of the special prosecutions unit designed to handle large-scale drug cases also scored some successes, including a guilty plea from narcotics kingpin Cornell Jones and the conviction of D.C. heroin dealer Eddie Adair.

DiGenova's impact on the 127 Superior Court prosecutors who make up 60 percent of the office's staff is the subject of more debate. To the attorneys who devote themselves to what is referred to as "God's work" of prosecuting local criminals, diGenova seems a distant presence who favors the "country club" of U.S. District Court.

Still, they acknowledge that diGenova took some steps to ease the burden of Superior Court prosecutions, which increased dramatically during his tenure. DiGenova added 21 assistants and lobbied successfully for seven new judges for D.C. Superior Court.

What seemed to capture diGenova's imagination, however, was uncovering a trail to Barry. An apparent opportunity came as soon as he took office: Investigators presented him with an FBI tape recording of a 1983 conversation in which D.C. government employee Karen Johnson told her boyfriend that she had provided cocaine to Barry 20 to 30 times.

Former law enforcement officials familiar with the case said they did not view a drug charge against Barry based on Johnson's allegations as feasible. But the prosecutors thought that Johnson might have other information of possible criminal actions by Barry and subpoenaed her to find out, the officials said.

Johnson, who was convicted of selling cocaine to others, refused to testify and was jailed for contempt of court for eight months.

Barry, who testified before the grand jury that he had not used or bought cocaine, reacted with a skillful public relations campaign. Among his strongest ammunition was a New York Times story that cited unidentified federal law enforcement sources saying he was under investigation for possible perjury.

"They used to just lynch people by rope a long time ago," the mayor told supporters at a rally Aug. 19, 1984. "After that, they're trying to lynch black people another way, and I'm not going to be lynched."

DiGenova denied leaking any grand jury information, and an inquiry by the Justice Department found no evidence of impropriety by him or his staff.

The cases against Donaldson and Hill, coupled with an inquiry into expenditures from the mayor's office, added graphically to the impression that diGenova had laid siege to the Barry administration. Then, on May 22, 1987, the prosecutor pulled out all the stops.

In a carefully choreographed series of events, Hill pleaded guilty at the U.S. District courthouse. Former city administrator Elijah B. Rogers testified before a grand jury investigating the mayor's accounts. DiGenova announced the end of an undercover FBI investigation into alleged payoffs to middlemen in return for D.C. contracts. And dozens of FBI agents searched the homes or offices of Johnson, Barry Cabinet member David E. Rivers, developer T. Conrad Monts, and John B. Clyburn, a prominent city contractor and close friend of the mayor's.

Johnson subsequently appeared before a grand jury investigating allegations that she received payments from Clyburn in return for her silence about the alleged drug sales four years earlier.

One more major engagement enlarged the scope of the conflict and set diGenova at odds with the D.C. police, who investigate the local criminal cases that are prosecuted by the U.S. attorney's office.

DiGenova and the FBI, without informing Police Chief Maurice T. Turner Jr., undertook a delicate undercover investigation of the alleged skimming of drugs and cash by police vice officers. Turner told associates that he was deeply hurt that he was kept in the dark, and police officials blamed diGenova and the FBI for damaging their once-close working relationship.

A top police official who is close to Turner said recently the breach has not healed in the intervening six months, during which no indictments of police officers have been returned.

"They are treating the police department like a bastard child," the official said.

In the middle of this whirlwind, diGenova decided to resign, though he could have extended his term if he wanted. His new job draws him back into the political sphere, as a lawyer in a law firm that lobbies heavily on Capitol Hill.

He leaves with his reputation hanging somewhat in the balance, in the custody of prosecutors who continue to pursue the undercover contracting investigation.

But, however that inquiry turns out, said one former top law enforcement official, diGenova will be remembered "for the risks he was willing to take."