For this day, Marvin Mandel was once again the consummate politician. He seemed to know when to speak, what to say, how to say it, whom to look at when he was saying it, when to laugh at his own jokes, when to turn toward the jury, when to peek back at the judge.

For a total of 3 1/2 hours today, at odd intervals between 9 o'clock in the morning and 4:30 in the afternoon, Mandel sat in the witness stand in a federal courtroom, governor of Maryland and witness in his own defense.

It may have been a courtroom, but in his first day of testimony Mandel drifted easily back to his roots, only now and then showing signs of the mild stroke that he had suffered within the 20 months since his indictment on political corruption charges.

"I was born in East Ballteemore, lived in Ballimur City all my life," Mandel said in his homey introduction to the jury, sounding friendly and relaxed.

His left hand, grasping a small microphone, did not shake. His legs, crossed at the knee, remained steady. As his wife Jeanne had said the day before, if you think Marvin Mandel was going to let the outside world know what was going on inside him during what may be one of the most don't know the governor very well, do you?"

His doctors had prescribed periodic rest breaks for him during his time on the witness stand, and there were a few times when Mandel looked like he needed them. He returned from his lunch nap blinking his eyes and shaking his head very slowly for a few minutes. Earlier, near the end of the morning testimony, Mandel's hand shook when his attorney, Arnold M. Weiner, tried to hand him a document, so Weiner placed it down next to his client. And he limped when he stepped down from the witness stand.

For the most part, however, the opportunity for Mandel to be part of the action, to - again in his wife's words - 'do more than just sit there day after day doing nothing," seemed to give him a spark that few courthouse observers had seen in him since the trial began on the first day of June.

"That's not the guy I've been watching all these weeks," said one regular in the balcony, a teacher from Baltimore County. "I've been watching a dead head, and now, all of a sudden, we're talking about a sharpie."

Dates and names spewed forth from Mandel's memory without pause: he was sworn in as governor at 12 noon on Jan. 7, 1969; he had been re-elected to the House of Delegates for a fifth time in 1967: it was 1960 when he worked on a state racing study committee, 1963 when he first worked on a racing consolidation bill: and so on. These were "softball questions to answer," as one defense attorney described them, designed to establish Mandel's grasp of things with the jury.

Twenty minutes into his testimony. Mandel was ready to tell stories and jokes. Under Weiner's gentle questioning, he recalled when he was told by former Democratic Gov. J. Millard Tawes what to expect in the state's top job. "When you go hunting," said Tawes, "check the blinds first, becuase they're all looking to lock you up."

Mandel looked at the jury and smiled, but saw no smiles in return. Instead, a retort came from Judge Robert L. Taylor, the 77-year-old with a Tennessee drawl: "Didn't be say: 'God have mercy on your soul'"?

The easy questioning persisted for another 20 minutes, with Mandel recalling how he tore down all the cubicles that his predeccessor. Spiro T. Agnew, had installed in the governor's office. The courtroom regulars in the audience started to get restless. "This is like a fairy tale," said one man who wear a bow tie and brown suit to court each day.

Down below, on the chair, Mandel was ready to talk about horse racing, the general subject that was so central to his indictment and the indictments of five of his friends. He told the jury that he lived near the Pimlico track - grew up two blocks away from it, in fact - and used to visit the track after school each day to sell papers. They called it Old Hilltop back then, said Mandel, "Everyone who lived there was related to that racetrack."

By this time Barnet D. Skolnik, the chief prosecuting attorney, was squirming in his seat. Skolnik has been waiting as long as Mandel for these few days. He came close to cross-examining Mandel last year, but a mistrial was declared before that time that came. Now, with the moment nearing again, there was Mandel talking about Old Hilltop. This is the same Barnet Skolnik who was so excited yesterday that he spent more than a half hour blurting off-the-record comments to reporters outside the courtroom, pausing now and again to say "I don't know why I'm doing this."

Moments later it became clear that the whole day would not be spent on such light-hearted matters as where Mandel grew up. At 10-20 in the morning with the precision of a surgeon, Weiner took Mandel in and out of some key questioning. Mandel was asked whether he had any advance knowledge that three of his codefendants and benefactors - W. Dale Hess, Harry W. Rodgers III and William A. Rodgers - owned 30 per cent of Marlboro Race Track at a time when legislation was pending that benefited the track.

"Absolutely not," said Mandel, looking hard at the jury. It was the same answer the governor gave at a press conference on April 24, 1975, when by his own account he believed he was being investigated by the U.S. Attorney's Office. That time, however, Mandel had said it twice? Absolutely not; absolutely not."

In the witness chair, Mandel was free of his habit of repeating himself. And he did not roll his eyes toward the ceiling, another habit said by his associates to mean that he is nervous. It was just as well, since the ceiling in the ultramodern courtroom would have rolled right back at him - it is made up of wave-like slabs of wood. His "absolutely nots" and "none whatsoevers" came and went without drama.

"Well," said the teacher from Baltimore County during one rest break, "there isn't much real drama left to this case anyway. It's pretty much cut and ried, particularly for the people of Maryland. We're seen this so many times with different politicians it gets to be like a rerun."

For the 12 jurors and five alternate jurors, however, the Mandel testimony seemed to be much more than a rerun.

After days of oftentimes detailed and confusing testimony, they finally got to hear from the man they have been learning so much about. There were indications that the jury found him both interesting and funny.

During earlier testimony, for instance, no more than three jurors were seen taking notes. When Mandel took the stand, six notebooks were in evidence. After working hard but unsuccessfully to elicit a laugh from the jury in the morning. Mandel scored late in the day, when he explained that his income would equal that of one of his codefendant's. Irvin Kovens, "if you moved the decimal point over about three places."