As Marvin Mandel stood at the House podium to swear in the state treasurer in the first and only formal act of his second brief reign as governor, the memories of all that he had done here for 25 years flashed through his mind. He was tempted, Mandel said later, "to pick up that gavel and pound the House into order."

But the years of real power were behind him now; the legislature he controlled so long as speaker of the House and governor is a very different forum. Today's swearing-in was mostly a symobolic gesture, marking both Mandel's temporary return after his corruption conviction was reversed and signaling the end of a turbulent chapter of Maryland political history.

"I only hope and pray this is the end of it," said House Speaker Benjamin L. Cardin after the ceremony. "Now we can get on to something new."

The state's political establishment has changed profoundly in recent months, and the most obvious change can be found in the State House. There, Mandel's old secondfloor office will be occupied Wednesday afternoon by Maryland's 57th governor, Harry R. Hughes, a very different kind of politician who quit the Mandel administration -- calling foul over the award of a public works contract -- and then won a landslide victory by promising clean and open government.

In both style and substance, Hughes appears in studied contrast to Mandel. A quiet, aloof man from the small country town of Denton on Maryland's Eastern Shore, Hughes talks about "easing into" government and reducing some of the governor's powers. He chose a former nun for the sensitive job of appointments secretary and has promised to do away with the old spoils system Mandel used so well to keep the legislature in line and give his political allies a piere of the action.

Mandel thoroughly enjoyed the trappings of power -- the constant companionship of friends and sycophants, the life at the mansion, the government junkets and trips in corporate jets, being chauffeured around in the back seat of state trooper cars. The code names given to him by those state troopers say something about his royal flair. The mansion was known as "the crown" and he was called "victor" and "falcon."

Hughes, if anything, is embarrassed by such things. His wife, Pat, has insisted that the governor's mansion be referred to from now on by its original name -- Government House. Hughes says he feels uncomfortable in the shadow of bodyguards and hates being in a car unless he is driving it himself.

In his campaign for governor, Hughes recounted the incessant controversies that turned Mandel's second term sour. Those were the years of loud headlines about Mandel's wife barricading herself in the mansion after he publicly announced plans to divorce her; Junkets to Jamaica aboard airplanes owned by a company doing business with the state; cronyism in appointments, and finally the federal investigation that temporarily brought down Mandel and his closest friends.

Hughes has completed the work that Blair Lee III started as acting governor in cleaning out the second floor of tough aides and administrative lobbyists, men whose daily mission was to march down to one of the legislative chambers and summon people to the governor's office with orders like "First and Sixth districts, upstairs!"

The Hughes staff -- announced Monday -- includes two blacks and four women. Mandel had no women in his inner circle, and only one black.

The state bureaucracy will also have a fresh look. Hughes has fired all but three of the cabinet secretaries and is expected tomorrow to announce the appointment of at least one black and one woman among the 12 department chiefs, who now are all white men.

Down one floor from the new governor's office, the state General Assembly convened last Wednesday, a very different legislature than the one in 1969 that elected Marvin Mandel, then speaker of the House Delegates, to fill Spiro Agnew's unexpired term.

The legislative leaders who helped Mandel get his way for nearly two terms have departed, making way for a more independent crowd -- not to be confused with their predecessors, who liked to be known as "the governor's men." The new leaders -- House Speaker Benjamin L. Cardin of Baltimore and Senate Presdient James Clark Jr. of Howard County -- believe in the separation of powers, not the old rallying cry: "That's what the governor wants."

It has been clear in the days since Mandel's corruption conviction was overturned that a large number of legislators -- particularly those who were elected on "good government" tickets -- were less than overjoyed by Mandel's brief return. The Prince George's delegation, for instance, infused with newcomers, overwhelmingly rejected a resolution congratulating Mandel for his court victory.

Mandel received only polite applause, not a hero's welcome, when he returned to the House chambers today to swear in William S. James as the state treasurer. "I can't wait to get this over with and get down to new business," said Robert Redding, chairman of the Prince George's delegation.

One of his colleagues, Del. Frank Pesci, said he and many other legislators were amused, but not heartened, by the turn of events this week. "It's like a soap opera," said Pesci. "Monday Lee was governor, Tuesday Mandel, Wednesday Hughes. I hope to God it's not goint to be Bogley [Samuel W. Bogley III, the new lieutenant governor] on Thursday."

The tone of this new legislature -- with its 64 freshmen delegates and senators -- has already been set in the first week, and it is a tone markedly different from that of the past. Two actions dramatized this difference today.

First came an announcement from the Legislative Services Department that it had not been asked to draft one new bill in the past 48 hours. Legislative leaders attributed this apparently unprecedented fact to what Cardin called "a new spirit of cooperation and realism" on the part of the lawmakers.

Then came a proposal to ban eating smoking and the reading of newspapers on the House floor. In the old days, such an idea would prompt jeers and grunts from politicians who had been accustomed to puffing cigars and now and then chomping into a juicy submarine sandwich during debates. Today, it was politely considered.

Mandel drew his strength by understanding the legislature. He served there 17 years before moving up to the governor's office. He got to know each leislator on a personal basis, their political skills and shortcomings, and he studied each bill carefully, knowing how the legislation would affect the politicians from every corner of the state.

His admirers say he used this knowledge for the good of the state. "Marvin," said his former chief of staff, Frank A. DeFilippo, "proved it took politics to make government work."

His detractors in the legislature say that Mandel used his skills to stifle dissent and take full control of matters that should have been resolved cooperatively. "Mandel is an evil-spirited man," said Sen. Victor Cushwa, a Democrat from Hagerstown. "Everything he did was for his own interests."

In either case, his mode of operation will not be copied by Hughes. No longer will Maryland's governor do some of the things that Marvin Mandel did -- such as have his aides hook up telephones on the Senate floor so that he could personally guarantee his part of an elaborate vote-trading scheme, or have state policemen remove the heelchair of a crippled senator to make sure he did not leave the floor when an important vote came up.

It was Mandel's unquestioned control of legislative events that hastened today's legislative independence. As former House speaker John Hanson Briscoe put it: "Marvin was coming up with 97, 98 percent of his bills being passed, and the newspapers kept attributing it to the vote trading and his promising things. That kept eating away at the insides of the legislators. They felt inferior."

Even the harshest Mandel critics concede his administration had its share of legislative triumphs. The sales tax increas Mandel passed two years ago keeps producing gigantic budget surpluses for the state -- over $200 million this year -- and the staterun lottery set up during the Mandel years continue to show astonishing porfits.

A hodgepodge of 284 state agencies, many with duplicate functions, were consolidated into a streamlined system of 12 cabinet departments during Mandel's first years as governor. A commission set up to regulate hospital costs has gained a national reputation for holding inflation in the health care field below the national average. By assuming costs of local school construction, welfare and the court system, the state allowed Baltimore and the 23 Maryland counties to spend their revenues on other projects.

But Mandel left behind many problems, some of his own design, some out of his control. The economic reversals suffered by the state duri ng the Mandel years may be the most difficult to undo. The state lost ground in growth of population, per capita income and jobs in the manufacturing and service sectors. The most obvious economic success was of dubious distinction -- the state became the national leader in growth of state government jobs.

Two more problems that worsened by mandel's inattention -- the badly overcrowded prisons and financially wobbly pension system for state employes -- are expected to trouble the Lgislature and incoming administration for years.