The Maryland Senate approved legislation yesterday overhauling the pension system that covers about 150,000 state employes and teachers, thereby ending a long, seesaw battle in that chamber on one of the most politically volatile issues of the session.

The 26-to-21 vote on the question was in some measure a victory for Acting Gov. Blair Lee III, who put his own prestige on the line in support of pension reform, and even invoked the name of suspended governor Marvin Mandel to help the cause. "He's just delighted," Lee's press secretary Thom Burden reported.

The bill, which was bitterly opposed by the powerful state employes' and teachers' unions, now goes to the House of Delegates where another sharp scrimmage is likely. The house leadership, however, is solidly in support of the measure and several senators predicted after yesterday's vote that the bill would have no trouble getting to the governor's desk.

Proponents of the restructuring plan argued throughout the long debate that any failure to revise the existing system could eventually result in bankruptcy for the state. By the year 2020, they said, 80 per cent of the present system's cost would have been coming out of annual revenues, instead of funds laid away for the purpose.

Scare tactics, answered the opponent of the restructuring plan, who pointed out that employes joining the new program - which is mandatory only for teachers and employes hired after it goes into effect - will have their pension benefits reduced by an average of 40 percent, compared to the existing system.

"This has got to be the worst bill I've ever seen in my life," Senate Majority Leader Roy N. Staten commented yesterday as he looked at the voting board, which showed he had lost his hard-fought campaign against the legislation. "This is a terrible bill," added Staten, who has spent much of his 25-year career in the legislature champioing state employes.

About three weeks ago, it seemed that Staten, a Baltimore County Democrat, had the votes to bury the bill quietly be sending it back to committee. But Sen. James Clark Jr. (D-Howard), sponsor of the measure, managed to get the decision post-poned long enough to come up with a compromise.

Last week, supporters of the measure agreed to an amendment by Sen. John J. Garrity (D-Prime George's), that delayed the effective date of the new program for 11 months, until June 1, 1979. Proponents of the legislation said the amendment helped pull Garrity and Sen. Victor L. Cushwa (D-Washington) over to their side.

"Placing this bill in a . . . holding pattern is the most responsible, prudent . . . course we could adopt." Garrity said yesterday after casting his "yes" vote.

However, Garrity's colleague from Prince George's, Democrat Arthur Dorman, responded that, "If we really wanted to do the job in this area, we should defeat this bill and come back next year and try again."

The argument that the decision should be put off for a year was made many times during the debate. Almost every senator was bombarded throughout the session by a barrage of mail from teachers who opposed the measure, and much of this mail indicated that the measure's supporters would face feirce opposition from the well-organized teachers in this year's election.

"I thought for a while we would not make it," Sen. Clark said yesterday af- ter the final vote of approval. "But it got a little better by the end . . . I think it will pass the House. And, in the final analysis, this has to be done."

Clark headed te commission that studied the whole question of pensions for nearly four years and that commisioned a series of long actuarial studies to help it arrive at its findings.

According to the estimates in one of these studies, the existing system would cost the state about $6.4 billion by the year 2020, whereas the new system - which would have completely superseded the present system by that time - would cost only about $5 billion.

During the first few years, however, the cost of supporting the two pension systems would run about $20 million higher annually than the cost of the existing system alone. This initial increased cost would level out gradually, so that by the mid-1980s the cost of the new system would be somewhat less than the cost of the existing one.

The total cost of the current plan was not as worrisome tot he actuaries as the fact that a cost-of-living increase, added to the old plan in the 1970s, had become a major drag on the system. The cost of these automatic cost-of-living increases, which are paid for out of annual revenues instead of laid-away money, makes up 35 percent of the plans' present $174 million price ltag.

The measure that passed the Senate yesterday empowers the state to set up a second completely prepaid pension system. Employes in the existing system will not be forced to join the new system, but if they decide to get into the new plan they will be given a lump sum refund of all their contributions to the new plan.

The new plan offers considerably reduced benefits, increases the allowable retirement age from 60 to 62, and eliminates the option that an employe could retire after 30 years' service. New employes hired after June 1, 1979, would be forced to join the new plan.