ANNAPOLIS -- Maryland Treasurer Lucille Maurer is often teased about working with the two most volatile personalities in Maryland politics in Gov. William Donald Schaefer and Comptroller Louis L. Goldstein. Maurer, always the diplomat, replied recently, "I call them legends."

Diplomacy is always in demand in Maurer's job. She serves many masters.

Because she is selected by the General Assembly, she is expected to be that body's voice on the powerful Board of Public Works, on which she serves with Schaefer and Goldstein. Because she is part of the executive branch, cordial relations with Schaefer are a necessity. And because she is responsible for the state's cash, and is called upon to make decisions affecting all of Maryland, she is expected to be a stateswoman.

"I do have a fine line to draw," she said in a recent interview.

Those who watch closely Maurer's performance say that not only has she succeeded, but she has also upgraded and expanded the influence of her office.

"She has made the treasurer a major player in state politics," said Del. Timothy F. Maloney (D-Prince George's), a vice chairman of the House Appropriations Committee.

Senate President Thomas V. Mike Miller Jr. (D-Prince George's) said he and House Speaker R. Clayton Mitchell (D-Kent) consider Maurer's selection "one of the highlights of the 1987 session. We both think she's doing an outstanding job."

Said Schaefer: "She's just good."

Heady praise for Maurer, a woman whose political career seemed over last fall.

Maurer, who served on the Montgomery County Board of Education for most of the 1960s and who was elected to the Maryland House in 1968, lost a hard-fought Democratic primary for the Senate to colleague Idamae T. Garrott. The finish was supposed to be a close one, but it wasn't.

Garrott scored Maurer for not doing enough for Montgomery County, especially for Maurer's role in creating education "equalization" formulas that sent more state money to poor areas such as Baltimore than to Montgomery. Maurer was unable to defend herself against the criticism.

Maurer, who turns 65 on Saturday, was "making lists of transferrable skills" when she became the beneficiary of a struggle between the newly elected governor and the General Assembly.

Schaefer wanted to replace Treasurer William James with his longtime adviser from Baltimore, Walter Sondheim. The General Assembly, which selects the treasurer, was not averse to replacing James, but its leaders were adamantly opposed to putting Schaefer's friend on the three-member Board of Public Works, which has vast powers to spend state money and award contracts. They compromised on Maurer.

Within weeks, Maurer was being sworn in for a four-year term, at an annual salary of $72,500. "While the outcome is certainly the happiest, I can't ever say I'm glad to lose {the Senate seat}," she said. "I'm too competitive."

Maurer, who majored in economics at the University of North Carolina and received a master's from Yale, had the background for the job, although she hadn't worked as an economist for years. "I don't pretend to be an expert, but I can bring in the experts and I can ask the right questions," she said.

She found an office where some internal bookkeeping was kept on legal pads and secretaries used old-fashioned typewriters (ever the diplomat, Maurer said James, a former Senate president, was always being called upon to take on other important state responsibilities).

She has transformed the office -- even physically -- and has taken back responsibilities that had been given to other departments. She has become active in courting the New York investment houses and was part of the state's widely acclaimed decision to sell off much of Maryland's stock portfolio before the downturn in the market.

But it is in her other roles that Maurer has won the most praise. "She's not just a good treasurer, she's a good politician," Maloney said. "It's rare that you get someone who is both."

Schaefer said Maurer has been an important addition to the Board of Public Works, and credited her with being more cool-headed than either he or Goldstein. "She's nice," he said. "Louis and I yell at people, but she gets the same things done in a quiet way.

"She's a soothing influence, let me put it that way."

Some legislators worried that Schaefer was trying to make Maurer his own when he assigned a state trooper to drive her to and from her Silver Spring home and when he invited her to be part of his regular Thursday cabinet meetings.

Maurer at first declined to attend the cabinet meetings. Now she does, because she said she learned they are informational meetings rather than meetings to make policy.

She consulted legislative leaders before attending the meetings, she said, and she keeps them informed of any potentially controversial issues on the board's agenda.

"So far, I've not had a crucial conflict in part because the governor doesn't want one," she said, adding "we want to be cooperative without being coopted."

Schaefer said he has a reputation as a "bull in a china closet," but that Maurer saw that he would not try to run over her. "She didn't find me saying, 'Okay, Lucy, listen up, this is how it's going to be.' "

And Maurer has shown that her quiet protests can change decisions.

Before one board meeting, Schaefer railed against legal aid attorneys who were funded by the state but then sued governments on behalf of their clients. He said he would not extend the contracts unless the lawyers promised not to take the state to court, something the lawyers said was impossible to promise.

In the public meeting, without any discussion, Goldstein and Schaefer voted for the proposal, the first of its kind in the nation and one that took Schaefer's own staff by surprise. Maurer quietly voted no.

After an outcry from the legal community and blistering editorials, the board reversed itself. Maurer and others worked quietly behind the scenes to find a compromise that would both save face for Schaefer and not harm the legal aid lawyers.

Some thought Maurer should have been more outspoken in her opposition, but she disagreed. "I think I created the issue by not voting for it," she said. "I didn't think it would help resolve the problem by being more outspoken."

Maurer acknowledged that she has another, unofficial responsibility, brought on by her being the highest ranking state official from the Washington suburbs.

"I think I can provide some insight on the Washington area" that is needed because of Goldstein's rural roots and Schaefer's Baltimore background, she said. "It's not that I alter a vote, but I think I offer a different perspective and sometimes I can head off a problem."

There's also been a "minor, attitudinal" change. It's no longer a long-distance charge to call the treasurer's office from Washington.