ANNAPOLIS, SEPT. 10 -- Two top aides to Gov. William Donald Schaefer, his chief legislative lobbyist and the state budget secretary, have resigned unexpectedly, creating a major vacuum in policy jobs on the governor's staff.

Longtime Maryland state Budget Secretary H. Louis Stettler III, a fiscal conservative who has clashed with Schaefer over spending issues, has accepted a job as deputy to state Treasurer Lucille Maurer.

And Alan Rifkin, chief of the governor's legislative staff, announced today he is resigning to become a partner in a law firm headed by Bruce Bereano, the top-earning lobbyist in Annapolis.

Schaefer said he was taken by surprise by the resignations. "They are two very valuable people," he said. He said he has not decided whom to hire to replace either of the two.

Both men said they would leave their jobs at the beginning of next month, citing their long hours as factors in their decisions to leave Schaefer's staff.

Rifkin, a 30-year-old lawyer who is regarded by legislators as the whiz kid of Schaefer's staff, said he might do some lobbying during the next legislative session, but he said he would stay clear of any legislation that results from preliminary work he has done during the summer legislative break.

According to John O'Donnell, director of the state ethics commission, Rifkin would not necessarily be prohibited from lobbying on legislative matters he worked on during this year's General Assembly session.

Rifkin, who said he was tempted by the financial and legal opportunities of working with Bereano, said he intended to "practice restraint well beyond" what the ethics law requires. Bereano has been the top earning lobbyist in Annapolis for several years, collecting $551,493 from the 58 clients he represented during last winter's three-month session.

Rifkin and Stettler both have won high marks in the legislature for their knowledge and effectiveness.

This summer, the governor lambasted Stettler in a meeting with budget officials, complaining that Stettler was obstructing Schaefer's spending plans. "You're hiding millions from me," the governor reportedly told Stettler. Schaefer later praised Stettler publicly and said he was not planning to fire him, but he said Stettler would have to learn a new style in his administration.

Stettler, 49, said that he decided to step down as budget director for personal reasons, not because of disagreements with Schaefer. The job has demanded "100 percent" of his time, said Stettler, a commitment that has become burdensome.

Stettler has worked in state government since 1973, and was named budget director by Gov. Harry Hughes in 1981. He had a major role in the fashioning the state's response to the savings and loan crisis of 1985.

Stettler said Schaefer wanted him to find ways to free more money in the budget, something every governor tries to do, but played down the importance of Schaefer's criticism of him.

"I did not consider it a signal to me that I had to leave," said Stettler.

Schaefer called Stettler "an excellent man," and "one of the great technicians" in state government.

Maurer, a former Montgomery County delegate who was appointed treasurer this year by the General Assembly, has generally taken a more conservative approach to state spending and borrowing than has Schaefer, a philosophy more likely to be shared by Stettler.

In his new post, Stettler will be Maurer's top deputy and will be responsible for managing cash and investments for the state. The job, which pays $65,500, will require Stettler to take a pay cut of nearly $8,000.

When asked about a replacement for Stettler, who informed the governor of his plans last week, Schaefer told reporters: "I haven't thought about it," but then said, "What I just told you is not true." Asked whether he was considering Charles Benton, his controversial finance chief while he was mayor of Baltimore, Schaefer declined to answer. But he praised Benton, who is now a part-time consultant on the governor's staff, as "one of the smartest men I've ever known in finance."