When Marvin Mandel invited him for a boat ride on Chesapeake Bay one night almost three years ago, Arnold Weiner knew the Maryland governor had more on his mind than the state of the crab harvest.

Weiner is one of a handful of lawyers across the country, many based in Washington and Baltimore, who specialize in defending politicians charged with corruption, and Mandel had found out he was being investigated by a federal grand jury.

Providing a legal defense for politicians charged with corruption is a booming field as federal prosecutors step up their attack on white-collar crimes, including those committed by public officials. In the past six years there has been an increase of more than 500 per cent in the number of federal prosecutions of state and local officials - up from 63 in 1970 to 337 last year.

With so few of them around, the lawyers who handle little else but political corruption cases are in great demand.

Weiner, for instnace, no sooner finished the Mandel trial when he began preparing to defend former Rep. Edward A. Garmatz (D-Md.) on charges of conspiring to take bribes from shipping firms. Mandel was sentenced on a Friday: by Monday the files on his case had been replaced in Weiner's office by cartons of documents dealing with the Garmatz charges.

Similarly, William G. Hundley, who represented Mandel's friend and codefendant, W. Dale Hess, flew to South Korea between conviction and sentencing to interview Tongsun Park, his present big-name client who is accused of bribing congressmen on behalf of South Korea.

Before that Hundley and his partner, Plato Cacheris, represented John Mitchell, Gulf Oil lobbyist Claude Wild and former West Virginia Gov. Arch Moore.

"It's funny," said one of the lawyers who specializes in political corruption cases, "you can read the paper, see that someone is in trouble and know that your phone will ring.

"You know you are going to get someone in the case - either a politician charged with corruption or the businessman accused of corrupting him."

Among those who handle most of the headline political corruption cases are the firm headed by Edward Bennett Williams and Paul Connolly (Jimmy Hoffa, Bobby Baker, former Hlinois Gov. and U. S. Judge Otto Kerner, John Connally and former CIA chief Richard Helms): Judah Best (Spiro T. Agnew, Harry Dent and Wayne Hays): Jake Stein (Watergate figures Kenneth Parkinson and Dwight Chapin): Norman Ramsey (Irvin Kovens, another Mandel co-defendant, and Baltimore County Executive Dale Anderson), and Stephen Sachs, who has phased out of the specialty now that he is running for Maryland attorney general.

Many of them are former federal prosecutors. Weiner, as an assistant U. S. attorney in Maryland, prosecuted two congressmen whom Williams defended, and Hundley headed the Justice Department's organized crime section when Robert Kennedy was attorney general.

It's a hell of a help to understand the investigation technique fo the Justice Department," said Weiner.

More than that, they are highly political, outgoing people with personalities strong enough to dominate clients, who are used to commanding headlines themselves.

"Politicians mistrust people who are not politically active." said Best. "They tend to go to politically active law firms."

For the most part, the lawyers command high fees for their work.Weiner told the judge Mandel still owed him $190,000, and Mandel's defense fund was reported this summer to have at least $200,000 in it.

"You men in Baltimore charge that much?" asked U. S. District Judge Robert L. Taylor from Knoxville, Tenn., who presided at the trial.

Williams, regarded as the king of all lawyers handling political corruption cases ("If I ever get indicted the guy I want on my side is Williams," said Hundley), was reported to have been paid $500,000 for his successful defense of John Connally. The successful defense means Connally is still considered a possible Republican presidential candidate.

The crimes politicians are accused of now go far beyond the old-style, cash-on-the barrelhead bribes that used to be given in exchange for a government contract. Instead they often involve a complex relationship between special favors and gifts, compaign contributions or investment shares. In order to bring the cases into federal court, prosecutors are using mail fraud statutes and laws designed to prevent labor racketeering.

These complex cases require thousoands of documents, which the government uses to try to prove the gifts really were an exchange for favors.

Keeping track of this mass of material is not easy for the defense attorney. It requires files, indexes and cross-indexes - all at the attorney's fingertips.

"It means spending thousands of hours and a lot of the client's money. The alternative is to go on unprepared, and I'd rather not take a case than have to skimp," said Weiner.

"It's a rare man who can afford to defend a major, complex federal crime case," added Paul Connolly, Williams' partner.

To do it right, Connolly said, the lawyer should be in on the case as soon as it appears that a person might be in trouble. This means monitoring the progress of the grand jury, talking to everyone who testifies to see what the client's position is.

"The first thing to do is find out if your client is a target of the investigation or a witness," said Best, "and if he's a target change him to a witness."

That often requires providing the government information on others who may be targets of the investigation, which rarely happens where all the potential defendants are closely knit, as they were in the Mandel case, but is more likely when there merely is a business arrangement, Best said.

The large number of defendants in these cases assures lawyers of plenty of business. Hundley, for instance, represented both Hess and Kovens at one point, but gave up Kovens when it appeared there was the possibility of a conflict.

Generally, no lawyer represents more than one defendent in a case, and often the U. S. attorney asks a lawyer to give up one of his clients.

These polential conflicts between defendants often show up as conflicts between lawyers on how the defense should be run.

"The best shot is a unified approach," said Hundley. "But a very, very, real problem in multidefendant cases is that almost invaribaly you run into some defense lawyer who wants to do it his way."

Sometimes it is because his client's interests are different from the rest. Sometimes it's because he has different ideas on how to try a case. But sometimes it's because although he is a good lawyer, he is not experienced in trying these complex political corruption cases.

Lawyers tell about the time Edward Bennet: Willams was involved in a trial with another attorney who rarely set foot in a courtroom. All went well until the other lawyer insisted - with the judge asking if he was sure he wanted to and Williams stage-whispering "no" - on introducing a document into evidence while the prosecution was presenting its case. By doing that, the lawyer made it impossible for any dependent to ask for a directed verdict of not guilty at the end of the prosecution case.

Williams was so angry, other lawyers said, that he slammed his case notebook on the table and stalked from the courtroom.

Political corruption trials are not easy for defense lawyers to win. "It's a lot harder than the Justice Department," said Hundley.

Best estimates are that the defense wins one-fourth to one-fifth of political corruption trials.

Hundley, for example, said he recently completed a mail-fraud case in Philadelphia similar to the case against Mandel and his friends. It involved the Penn-Central Railroad and his client was acquitted on all 23 counts.

"There wasn't the community drive for conviction," he said. "I don't think it is easy for a juror to acquit in a political corruption case."

Yet the trialse are important for the lawyers. If they are not willing to take a tough case into the courts, they have less fo a chance of negotiating a better deal for the clients in other cases.

"There's a lot of bluff and bluster," said Weiner, "and the greatest thing going in negotiations is being tough in a trial.