The Maryland General Assembly completed its work, without the usual chaos, at midnight tonight after Gov. Harry Hughes broke with tradition by venturing to the podiums of both the House of Delegates and Senate to praise them for "the most successful session you can imagine in an election year."

Democrat Hughes, who will campaign for reelection on the basis of the accomplishments of the Democratic-dominated assembly, flashed a "V" for victory sign at the legislators for approving two politically explosive measures that had eluded enactment for years: Raising the minimum drinking age from 18 to 21 and increasing the state's gasoline tax by 4.5 cents a gallon over the next two years.

After receiving Hughes' congratulations, legislators in both houses gave him a standing ovation, reflecting an easing of the tensions that marked the relations between the legislative and executive branches of government during the first three years of his term.

Senate President James Clark Jr. and House Speaker Benjamin L. Cardin joined Hughes in self-congratulation.

Clark called the session "a great experience in fellowship and camaraderie." He predicted that the higher drinking age and stiffer sentences on drunk drivers "will make our highways safer; hopefully we have saved lives."

Cardin, taking a swipe at the Republican administration in Washington, said the state "has not tried to solve our problems on the back of local government." He agreed with Hughes that "it was the most productive session we have had . . . an impressive list of accomplishments for any year, and particularly for an election year."

The interruption of the final hour of the legislative session was possible because the assembly had acted on most of the controversial matters on its agenda well ahead of tonight's midnight deadline.

In the final moments, the assembly approved placing 131 mentally retarded patients in community group homes; facilitated the adoption of children in long-term foster care situations; voted to continue benefits, cut by the federal government, to pregnant women on welfare, and ordered police to give blood alcohol or breathalyzer tests to motorists involved in fatal accidents.

Legislation that failed to get 11th hour approval included collective bargaining for state-employed police and fire officers, which was backed by organized labor, and relaxing of speedy trial provisions, sought by prosecutors who say overloaded dockets are forcing them to set free some suspects.

In place of the often hectic compromising and deal-making on major issues that have characterized recent sessions, the 1982 session wound down with the two chambers ironing out minor differences on bills.

Among the last of the measures to be decided was increasing the maximum weekly unemployment benefit from $140 to $153.

Legislators also voted to extend the life of those benefits 13 weeks, to 40 weeks, in the face of near-record 9.8 percent unemployment rate in the state. Jobless workers now receiving benefits already can get them for 40 weeks, but a change in the federal guidelines will jeopardize long-term recipients after Sept. 26. The legislature's action today insures that Marylanders will continue to be eligible for the extra one-quarter of a year, through June 1983.

Lawyer-members of the General Assembly helped give final-day approval to a bill that overrides a recent Courts of Appeals ruling that would permit parties in uncontested divorces to mail affidavits to the court. Today's action requires divorcing couples to go to a court and appear before a judge or a domestic relations master.

The House also today agreed to a Senate-passed one-year extension of a $22 million bond authorization for Baltimore's Memorial Stadium, sending the bill to Gov. Harry Hughes for signing.

After protracted bargaining, the House and Senate agreed to exclude from Maryland tax forms the option of contributing $2 in extra tax payments toward a public campaign financing fund. The state will continue to collect interest on the nearly $1 million that has been collected from some 200,000 taxpayers since the measure took effect in 1975. Under the compromise worked out tonight, the state must determine by July 1985 how the money will be spent.

The legislators will return to voters in their districts carrying a record of politically risky accomplishments that includes raising the gasoline tax and the ceilings on interest rates while failing to enact comparable corporate tax increases or stronger gun control laws.

They approved a number of controversial measures: a 4.5 cent a gallon gasoline tax increase during the next two years, an increase in interest-rate ceilings to 24 from 18 percent on most consumer loans, and new charges for second-mortgage loans. Even the record-high $6.2 billion state budget, proposed by Gov. Harry Hughes in an era of fiscal conservatism, was spared the radical surgery usually performed by the cost-cutting legislature.

And after five years of trying, the legislature, under intense public pressure to act, waited until an election year to raise the legal drinking age to 21 from 18.

At the outset of this session, there was every indication it would be an undisciplined, runaway legislature, more responsive to back-home constituents than to the leadership or the governor. This was the first session in Maryland's political history that combined an election-year with legislative reapportionment, a coincidence that will not be repeated until 2002. Many legislators blamed the governor and his detached style for allowing a politically explosive agenda to pile up for an election year.

The earliest, most visible affront to the leadership came over a controversial proposal requiring annual inspections of automobile emissions--a federally mandated program strongly backed by Hughes but targeted for repeal by some legislators who saw it as a good deregulation issue to save taxpayers money.

But the election-year revolt never happened, leaving the only real surprise of the session the fact that Hughes and the leadership managed to work so closely together after three years of strained relations. The emissions repeal drive was defused when Hughes accepted a six-month delay as a compromise.

The home-bound legislators will have to explain why they approved bills that voters may perceive as anticonsumer while approving several bills helpful to business. In a surprise move, Hughes and the leadership reversed earlier stands and won approval of higher interest rates on consumer loans and credit card charges, giving the lending industry its biggest victory here in years.

Consumer advocates, whose victories were few, managed to prohibit membership fees on credit cards and to prevent certain processing charges on second-mortgage loans.

The business community won better results. Corporations won when a bill failed that would have allowed the state to "decouple"--to vary from federal tax law in order to collect corporate taxes on depreciated equipment at current rates. That bill, which Hughes endorsed in the final weeks of the session, would have given the state hundreds of millions of dollars during the next five years. Supporters said that many of the state's human service programs would disappear if state revenues dwindle.

In what was probably the biggest disappointment for Hughes, the legislature refused to stiffen penalties for people carrying illegal handguns. But despite the election-year appeal of anticrime laws, Hughes and the legislative leadership encountered intense lobbying by the National Rifle Association. That pressure led the Senate to weaken the key gun control bill to the point that some legislators viewed it as useless. It failed in the House Judiciary Committee.