It was January 1977, a time when the trial of governor Marvin Mandel on federal racketeering charges had sensitized Maryland politicians to the perils of corruption. Howard A. Denis, a Republican from Montgomery County, was settling in for his first week as a member of the state Senate.

Denis was sitting at his desk in the ornate Senate chamber when a page delivered a white envelope. Inside was a wad of money and a note that read: "Denis: There's more where this came from."

"I was almost apoplectic with rage," recalled Denis, who ran to the Senate lounge in search of the bag man. Unsuccessful, he returned to the floor to discover a cluster of senators convulsed in laughter.

In the middle was the ringleader, a short, rotund prankster from Baltimore County named Melvin A. Steinberg -- Mickey to all but a few family members.

For Steinberg, it was only one of many gags that he has been running since 1967, when the labor lawyer arrived in Annapolis with an appetite for power as keen as his wit.

Eighteen years later, the 51-year-old Democrat from Pikesville still has them rolling in the aisles of the Maryland Senate. But as president of the 47-member upper chamber of the General Assembly, Steinberg also has his colleagues jumping through hoops, and many say he is perhaps the most effective leader that the sometimes unruly body has had in a long time.

"He's gone from being the clown prince to being the crown prince," said Denis.

Any lingering doubts about Steinberg's mastery of the Senate were erased last week when he single-handedly convinced the full Senate to overturn a $36 million, across-the-board cut in Gov. Harry Hughes' budget that had been made by the powerful budget committee.

"It was raw power," said Sen. John C. Coolahan, a Baltimore Democrat and one of eight budget committee members supporting the budget cut.

"You save your muscle for the big ones," said Victor L. Crawford, a former Montgomery County senator who now lobbies for the county's council.

"When the big one came, Mickey got 31 votes. That's a lot of votes to overturn a major committee. But he had to do it. He had to bury them. They'll listen to the balletmaster if he bangs the baton hard enough."

Since 1983, when he took the Senate presidency away from James Clark Jr. in a victory that capped six months of political combat, Steinberg has been rapping the baton on a regular basis. And he has done it considerably harder than his recent predecessors, William S. James, Steny H. Hoyer and Clark.

"He controls the Senate better than anyone I've seen," observed Sen. Laurence Levitan, a Montgomery County Democrat who chairs the budget committee. "Billy James was low-key. Steny was a good leader, but he wasn't able to resolve the filibusters. Jim Clark basically let things happen without taking charge. Mickey uses the authority he has."

Levitan, of all people, ought to know. A close friend and business associate of Steinberg, Levitan nonetheless stuck with his county colleagues who were backing Clark in the Senate presidency fight. Levitan supported Clark despite repeated warnings from Steinberg that it could cost him his coveted chairmanship.

Steinberg began plotting his move during the 1982 legislative session, when Clark left the podium to lead an unsuccessful fight for a redistricting plan that would have benefited his own county at the expense of Prince George's. The effort earned Clark the enmity of the Prince George's senators, who urged Steinberg to run for president.

Beginning in June 1982, Steinberg and Clark engaged in a form of trench warfare that the Senate had rarely, if ever, seen. Using the Senate's leadership positions as currency, both men continuously upped the ante in a furious effort to collar the 21 votes needed to win the Democratic caucus.

"He kept calling me and telling me, 'Larry, I'm going to win this thing,' " Levitan recalls. "But I really didn't take him seriously that he would take away my chairmanship. I never realized the toughness he has."

Steinberg offered the chairmanship to a black senator from Baltimore during the bargaining. That senator declined, but Steinberg won the black caucus' support. He then threatened to deliver the coveted budget committee chairmanship to a rural conservative if the caucus didn't stick by the deal. In the end, after Steinberg captured the presidency, Levitan was able to keep his chairmanship, but he has not crossed Steinberg since.

"I wasn't going to lose that race," recalled Steinberg. "I said to the black caucus, You know my philosophy. . . . But don't push me to the wall. I am going to be president. I'm not going to let someone take it away from me. It's your choice.' "

Anyone familiar with Steinberg's political history would have realized that the threat was not an idle boast. Defying the Baltimore County organization that discouraged his candidacy, Steinberg won election to the Senate in 1966 as an independent who promised to bring kindergarten classes to his county.

Arriving in Annapolis as a self-described political novice, Steinberg promptly overthrew the political boss of Baltimore County, Sen. James Pine, by capturing the chairmanship of the county senators. Steinberg ascribes his success to an accident of history in which reapportionment meant the county had seven senators rather than one, and the encouragement of governor Spiro Agnew, a Republican who was looking to take a swipe at Pine.

But Coolahan remembers that Steinberg was hardly the reluctant participant.

"He was about as naive as a rattlesnake about to strike," said Coolahan. "He grabbed the opportunity when he saw it."

Seizing opportunities always has been a trademark of the Baltimore native, the second son of an Orthodox Jewish immigrant who fled the pogroms of Russia shortly after World War I.

Growing up above the family grocery store, Steinberg graduated from high school at 16 and decided to enlist in the Navy, a choice that appalled his parents, who expected him to go to college.

"That's when I cut my first deal," remembered Steinberg, who agreed to go to college but insisted on joining the Naval Reserve. He later settled in Baltimore County with his wife and three children.

Steinberg admits that he would love to be governor, but he recognizes that his chances are not good. Some political observers said they suspect that his real ambition is to be Maryland comptroller if Louis L. Goldstein ever relinquishes the post.

In the Senate, Steinberg's penchant for the bold, politically astute stroke propelled him steadily upward. In 1978, he broke with his county delegation and supported Clark for president over Prince George's County Sen. Edward Conroy, winning the chairmanship of the Finance Committee when Clark prevailed.

Four years later, capitalizing on widespread resentment that the Senate under Clark's laissez-faire style of leadership was being bullied by the more disciplined House, Steinberg stole the presidency from his former ally.

"When Clark was in, House Speaker Ben Cardin ran both houses," said Sen. Arthur Dorman (D-Prince George's). Steinberg has changed that to the point that one House member, a frequent Cardin ally, said that "Mickey runs this place now, not Ben."

As president, Steinberg quickly moved to dispel the notion that he would be an errand boy for organized labor. For his leadership in the fight to restrict the pensions of public employes during 1983 and 1984, he was vilified by the state's teachers. But he gained respect in the legislature even as some of his heavy-handed tactics were bringing yelps of outrage.

The day that the House passed the pension bill last year, for example, Steinberg rammed the measure through a Senate hearing and to final passage in less than seven hours. It was a stunning achievement that left the legislature's normal procedures in tatters but kept the bill's opponents from mounting a counteroffensive after the House vote.

Four days later, Steinberg ruthlessly quelled a revolt by Montgomery senators seeking to defeat a subway appropriation for Baltimore. He hastily gaveled the Senate into recess over a chorus of protests. By the time the Senate reconvened that afternoon, Steinberg had turned enough votes to give Baltimore a 25-to-21 victory.

"You either run the gavel or the gavel runs you," growled Steinberg at the time.

If there is a single quality of Steinberg's that allows him to occasionally run roughshod over his charges yet retain their respect and affection, it is his wit and impish sense of humor.

"I use humor to take the pressure off," admits Steinberg, a natural comic whose one-liners are as spontaneous as his spoofs are elaborate. His puckish pranks have become part of Annapolis folklore.

Just a few weeks ago, Steinberg added to the lore by besting Cardin when the House speaker tried to turn the tables on the president. Steinberg was in the midst of a minor dispute with the mayor of Annapolis over parking spaces, and Cardin enlisted a lobbyist to send Steinberg a copy of a fake letter to the mayor saying the lobbyist had been retained by the two leaders to begin condemnation proceedings to seize the parking places.

Spotting a phony, Steinberg recruited a reporter to call Cardin to get comment on a story that the Senate president had rejected the lobbyists' help but had asked the attorney general to sue the city of Annapolis. Cardin, aghast, spent several anxious minutes trying to convince the reporter not to print the story before he realized he was the victim of his own joke.

"You can't con a con artist," said Steinberg.

"Beneath his humorous exterior," noted Denis, "lies a tremendous pride, intelligence and shrewdness. He's a strong leader who strives to be fair. I forgive him a lot because I'm personally fond of him."

Most senators share that view. They are delighted that Steinberg's skills as a mediator have prevented any of their filibusters from getting out of hand. Under Clark, said one senator, the floor during filibusters "resembled an Oriental bazaar."

This session's lone filibuster, on a bill to end the election of Circuit Court judges, was quashed by a Steinberg compromise. Said Denis: "His timing was exquisite. He knew exactly when to call people in, he knew exactly what to say, and he knew exactly what each side could live with."

However, Steinberg sometimes refuses to joke or negotiate.

"He's got the iron fist inside that velvet glove," said Crawford.

The Senate's consideration of the budget committee's $36 million cut last week was such a time.

Failing to get a majority of the committee to reverse its stand, Steinberg simply trounced them on the floor. Senators said that he did not threaten them but used his power to persuade committee chairmen to bring their members into line on the vote. Ignoring the Senate's traditional committee system, he even persuaded the budget committee chairman and vice chairman to vote against their panel's recommendation.

That episode has left some festering bitterness on the budget panel.

"He effectively destroyed the budget committee," complained Coolahan. "He doesn't want dissension. I've lost a lot of respect for him for what he did."

But others believe that Steinberg is wily enough not to overplay his authority.

"Every now and then he has to show he's a leader," said Crawford. "By next year, all this will be forgotten and the only thing that will be remembered is that the president of the Maryland Senate is in charge."