The city's chief prosecutor, William A. Swisher, was found innocent today of charges that he sold the powers of his office to a political boss and halted a major corruption investigation on the boss' orders.

The verdict was a rare defeat for federal prosecutors here who have established a national reputation for winning corruption cases against public officials, including former vice president Spiro T. Agnew and former Maryland governor Marvin Mandel.

But this time, the government's case "was just not strong enough," according to one member of the jury that had deliberated for 21 hours since last Tuesday.

In the crowded federal courtroom today, Swisher smiled wanly and dropped into his chair as the presiding trial judge announced that "the verdicts are not guilty" on 18 counts of mail fraud and three of extortion.

Moments later, on the courthouse steps, Swisher, his voice cracking, told reporters, "I'm very happy I didn't let my voters down." Then, so overcome with emotion that he couldn't speak, Swisher was hurried into a waiting car by his lawyers.

The 46-year-old prosecutor, now in his second term heading the largest state's attorney's office in the state, still faces federal charges that he evaded about $7,000 in income taxes over three years.

The charges were brought in connection with the alleged mail fraud and extortion scheme, but Swisher is to be tried separately on the tax counts.

During the eight-week trial in U.S. District Court here prosecutors charged that the legendary Baltimore boss, the late James H. (Jack) Pollack, plucked Swisher from the obscurity of a neighborhood law practice and, with money and support, propelled him to the state's attorney's post.

In return, the prosecutors charged, Swisher surrendered hiring decisions to Pollack, who often received payoffs from the job seekers. They also accused Swisher of stopping a major investigation of a city bid-rigging scheme after the suspects paid Pollack about $25,000.

One target of that investigation later was convicted on federal charges stemming from the same scheme.

Swisher was accused of receiving $3,920 of Pollack's payoff.

In several days of testimony, Swisher denied every allegation and said that the investigation he was accused of halting at Pollack's behest actually died for lack of evidence.

But several jurors said yesterday that Swisher's testimony had had little effect on their decision to acquit him.

One said that during the "agonizing" hours of deliberation the "major question for many of us did not deal with the defense, but whether the evidence presented by the government had proved beyond a reasonable doubt the charges." This juror said that, for him, the decision turned on whether prosecutors had proved "the most serious charge" -- that Swisher had helped Pollack extort $25,000 from the targets of the bid-rigging investigation.

On Wednesday, their third day of deliberation, the jurors sought clarification from Judge Alexander Harvey II on four basic legal principles, including the prosecution's burden to prove guilt beyond a reasonable doubt.

"Once we were sure we understood that, it was all over," said one juror. But a second juror said it still took several hours for all 12 members to agree to acquittal.

After the verdict, Swisher rode the half-dozen blocks to his wood-paneled office in the city's old criminal courts building, where scores of staff members and well-wishers drank to his victory. Swisher kept repeating that he was the prosecutor "for the little guy."

As the celebration continued, Milton Allen, the man Swisher unseated in the bitter, 1974 election campaign that was the focus of the trial, walked into the room.

Allen, now a city judge, had testified against Swisher at the trial, but today he offered congratulations. Swisher threw his arms around Allen and kissed him on the cheek.