After years of debate and two successive gubernatorial scandals, the Maryland legislature yesterday raised the governor's salary from $25,000 to $60,000.

The raise, approved overwhelmingly (107 to 13) in the House of Delegates, will take effect with the start of the next term in 1979, making Maryland's governor the fifth highest paid in the country. He is now the lowest paid.

Maryland voters defeated a proposal to increase the salary to $45,000 in a 1974 referendum although they later approved a measure giving a special commission and the legislature the power to raise the pay without resort to referendum.

The level of the governor's salary was one of the issues raised by the defense in last summer's political corruption trial of suspended Maryland governor Marvin Mandel. Attorneys for Mandel argued that the governor's relatively low salary forced him to depend on wealthy friends to pay for his vacations and even for his clothes.

Mandel was convicted of mail fraud and racketeering last August after a jury heard testimony that he accepted $350,000 in gifts and business interests from friends who benefited from race track legislation quietly pushed through the legislature by the governor.

In a news conference last fall, Acting Gov. Blair Lee III said, "The present situation is just plain grotesque. The lieutenant governor, the comptroller, the attorney general and the state treasurer all get salaries of a shade under $45,000, and the governor, who is thoretically the boss, gets $25,000.

"Half the people who work here on the second floor (in the governor's office) . . . get more pay than the governor; in fact, his secretary is within a few dollars of him now," Lee continued.

Senate President Steny H. Hoyer (D-Prince George's), who like Lee is a major contender in next fall's gubernatorial primary election, said yesterday that he felt the raise was "entirely appropriate."

"The chief executive of the state manages a $4.4 billion budget and 60,000 employees," Hoyer said. "This is a very responsible job and we ought to pay the person in that office commensurately with that responsibility."

A number of legislators who opposed a gubernatorial salary raise over the years had pointed out that the state's chief executive lives rent-free in the governor's mansion and has unlimited access to such perquisites as the state yacht and an unvouchered $40,000 household expense budget.

Those benefits "are only temporary," said Hoyer, "and you can't use them to send kid to college."