Marvin Mandel's political corruption conviction was overturned by the Fourth U.S. Circuit Court of Appeals yesterday, clearing the way for the suspended Maryland governor to return to office for the remaining five days of his term.

Shortly after he heard that the appeals court sent the case back to Baltimore federal court for a possible retrial, Mandel told reporters that he would need some time to decide whether to reclaim the job from which he was suspended when he was sentenced to four years in jail in October 1977.

"Right now, I'm still to excited to think about it all, with the telephone calls, the friends, the people who've been calling and wishing us well," Mandel said yesterday after he heard of the ruling.

Friends of Mandel said it is unlikely he will remove the acting governor from office and take over the job himself. Instead, they said, he is likely to announce at a news conference today that he plans a "ceremonial takeover" to "restore his self-respect in the office."

Prosecutors refused to comment last night on whether they would attempt ot retry him.

The decision of the appeals court, which cited a variety of procedural errors by the presiding judge at the trial, was released virtually on the eve of the inauguration of Harry R. Hughes, who had made political corruption a theme of his campaign for the governorship.

Mandel was convicted in August 1977 of 17 counts of mail fraud and one count of racketeering after prosecutors charged that he had accepted $350,000 in gifts, vacations and stock from wealthy friends in return for using his office to enrich their business interests.

According to the appeals court opinion, crucial testimony pointing to Mandel as the man who influenced legislative actions for the friends' benefit should not have been admitted into evidence. The testimony was unreliable, the appeals court ruled, since the politicians who gave it were not in a position to know the facts.

The appeals court yesterday also overturned the convictions of Mandel's friends -- Irvin Kovens, Harry Rodgers, William A. Rodgers, W. Dale Hess and Ernest N. Cory. With the exception of Cory, all the codefendants were close associates of Mandel and major political forces i n Maryland.

Their convictions ended Mandel's second trial -- the first had ended in a mistrial eight months earlier -- and made him the first Maryland governor in this century to leave oiffice in disgrace.

"Nobody can appreciate what the family and I have been through unless you've been through it yourself,c Mandel said in an interview yesterday. "This is a vindication that (has taken) a long fight to achieve."

Acting Gov. Blair Lee III, defeated in the September Democratic primary by Hughes after taking over the chief executive's duties when Mandel suffered an apparent stroke early in his second trial, reacted with equal elation. "I think it's wonderful," he said.

"I think it's great for Mandel, great for his family and great for the state of Maryland. I firmly believe that just as people accepted the decision of the trial court, they should accept the decision of the appeals court."

Federal prosecutors reacted with disbelief when told of the ruling. "Jesus Christ. This is the first I've heard of it," said U.S. Attorney Russell T. Baker, whose office led the Mandel prosecution.

The prosecutors approached the trial with two principal themes. First, with revelations that made headlines for weeks on end, they showed what Mandel got from the defendants.

There were expensive clothes, bought for Mandel with hard cash by his friends. There was a secret rendezvous with a mysterious "man in a green suit" to help pay off a Mandel debt.

Secretive and luxurious trips to Florida were bought for the governor by his friends and tens of thousands of dollars worth of loans were extended to help him pay for a divorce from his first wife, Barbara.

Mandel was literally "bought" by his codefendants, the prosecutors charged.

In return, Mandel helped Hess, the Rodgers brothers and Kovens become wealthy with millions of dollars in state contracts and help in securing state actions which would increase the value of Marlboro Race Track.

The government's primary evidence of the Marlboro deal was an intricate legislative maneuver which they accused Mandel of masterminding.

When the track was previously owned by some Western Maryland businessmen, Mandel vetoed a bill which would have doubled the number of lucrative racing day allocated to the track.

After the veto, Hess, Rodgers, Kovens and Cory secretly purchased the track from the businessmen at a price drastically reduced because of the governor's action.

In 1973, in the following legislative session when the legislature routinely considers overriding vetoes, the government charged that Mandel quietly worked to have his own veto overturned. The track suddenly took on new value and was merged iwth Bowie Race Track.

Bowie owners, who thus included Mandelhs friends, became the beneficiaries of Mandel's help. Mandel backed a bill which would have given Bowie more racing days than any race track in Maryland history.

That measure ultimately failed in the legislature when rumors surfaced about the involvement of Mandel's friends.

Because of the nuances of the case -- the inability of prosecutors to show any dircet quid-pro-quo -- the government concentrated on proving criminal intent.

The defendants covered up both the race track investment and the gifts to Mandel with elaborate book-keeping devices and "front men." prosecutors said. In one instance, one of the codefendants had his secretary completely re-do a ledger to cover up payments to Mandel. This provide that Mandel and his friends knew they were breaking the law, the prosecutors charged.

The 122-page appeals decision was reached by a 2-to-1 vote of the three-judge panel, with Judge John D. Butzner Jr. dissenting. The two judges who concurred in overturning the verdict raised a variety of procedural objections to the actions of presiding trial judge Robert L. Taylor.

The judge, the appeals court said, was wrong in allowing parts of the hearsay testimony by several state senators to be considered by the jury.

While some of the senators' hearsay testimony was admissible as evidence under a "catchall" exception to the general prohibition on hearsay, "We also do not believe the evidence in question prossesses the guarantees of trustworthiness" required, the majority said.

Two state senators had testified during the trial that they had been told Mandel wanted his veto of the race track legislation overriden.

"In a criminal case we must be careful that a conviction is not based on speculation. When combined with a rguably relevant nonverbal evidence... the hearsay testimony admitted by the trial court must have been quite prejudicial to the defendants."

In addition, the appeals court said, Taylor, who was brought in from Knoxville to hear the case, should not have allowed the jury to consider the state ethics code for public officials as part of the evidence in the trial, because the code specifically did not apply to Mandel.

"We do not think admittedly inapplicable standards of conduct had a proper place in the trial," the majority opinion said.

In addition to allowing the jury to consider improper evidence, the appeals court said, the traial judge also failed to instruct the jury properly on the relevant law in the case before the jury began deliberations.

The incomplete instruction, the opinion said, "leads us to the conclusion the jury may have easily been misled."

The jurors should have been told that, in order to find Mandel guilty, they had to be convinced that Mandel knew of the true ownership of Marlboro race track at the time the legislation which increased the track's value first came before the General Assembly, the appeals court ruled.

Without knowing the true owners, the court said, Mandel could "hardly have participated with specific intent in a scheme to defraud that involved misrepresentation or concealment of the names of the true owners.c

In his instructions to the jury, Taylor should have explained the legal definition of a bribe, the appeals court said.

"The failure by the district court to instruct the jury on the distinction between legally innocent benefits and bribes in the context of the mail fraud counts leads us to the conclusion that the jury may have easily been misled," the panel said.

The opinion, written by Judge H. Emory Widener Jr. with concurrence of Judge Donald S. Russell, also took exception to the admission into evidence of certain statements without proper identification of the person who made them.

"We are dealing with a purely legislative political scene," the court's opinion said. "Some of the most damaging statements were repeated by longtime political enemies of the governor."

Prosecutors had argued that large numbers of senators had testified essentially to the same facts so that the sheer weight of their numbers gave these facts the necessary credibility.

The other member of the appeals panel, Judge John D. Butzner Jr., issued a dissenting opinion. Butzner said, "The trial of this lengthy case required the able, experienced district judge to whom it was specially assigned to make many rulings involving the admission and exclusion of evidence and to explain to the jury in clear and concise terms the principle of law upon which both the prosecution and numbers defendants relied.

"To do justice to both sides," Butzner said, Taylor "had to exercise in full measure the discretion entrusted to a trial judge... My study of the record convinced me that the trial judge responsibly discharged his duty."

Reached at his home in Knoxville, Taylor said it would not be proper for him to comment on the appeals court ruling.