Just three years ago, Maryland ranked near the bottom of the 50 states in welfare spending. Its average monthly payment of $77.94 to a welfare family in 1980 was 32nd in the nation, higher only than states in the Deep South such as Mississippi, Alabama and Louisiana, and a few in the far north and Southwest.

Despite that low ranking, Maryland was beginning to change its outlook on welfare. A sympathetic state administration was in office and a new attitude had slowly filtered into the State House. The governor's current plan to spend $15 million for welfare increases in fiscal 1983 would push Maryland to 27th place nationally in welfare spending.

But now it appears some of the state's progress may be short-lived.

As the legislature begins to consider the proposed welfare increases, there are signs that new economic and political factors could threaten the program's future.

Gov. Harry Hughes, a liberal Democrat, made welfare a top priority of his administration when he took office in 1978. His human resources secretary, Kalman R. Hettleman, has been an outspoken advocate of programs aiding the poor. Through reapportionment in 1970, the legislative delegation from Baltimore, where 60 percent of the state's 220,000 welfare recipients live, became the most powerful political delegation here and a major force pushing for welfare programs.

And the Catholic Church got involved, helping reverse the legislature's historical distaste for welfare by providing money and backing for a welfare lobbying organization that has become one of the most sophisticated lobbies in the state.

As a sign of the new times, last year a conservative Republican senator from rural Anne Arundel County, John A. Cade, took the lead in pushing for welfare increases that would have cost the state $96 million annually by 1986. He said his bill would have narrowed "the appalling disparity between our ability to take care of these poor people and what we actually do."

But despite the growing support of state officials and the conversion of conservatives such as Cade, the welfare issue is beginning to change from one of conscience to one of dollars. Brought on in part by the Reagan administration's "new federalism," there is a deepening concern among legislators, state officials and welfare lobbyists over the state's ability to sustain a program that the federal government has threatened to abandon.

The state's ambivalent position on welfare became evident in Hughes' decision veto Cade's welfare bill of last session.

"Increasing welfare grants remains a commitment of mine, but without sufficient revenues or new revenue sources, such increases cannot be made," Hughes explained in his veto message. "I cannot in good conscience sign this bill today." Hughes said the Cade bill would raise "false hopes" for welfare recipients by forcing the state into a financial commitment it could not keep.

Last week, despite fiery exhortations by Cade, a number of welfare supporters changed their original votes and the Senate upheld the veto by a narrow margin.

Perhaps most troubling to welfare advocates is that President Reagan's system of reducing money for social programs while simultaneously transferring responsibility for them to state governments--arrived at just the time when more state legislators were beginning to consider welfare a serious issue.

"State legislatures and state governments are more sensitive to these issues than they were 20 years ago," says Del. Nancy Kopp (D-Montgomery), vice chairman of a House Appropriations subcommittee on human resources. "But I'm sure very few states in the union are going to raise taxes to pay for welfare."

"People feel there have been significant gains this year," says one senior legislative aide. "But now we're bucking upstream. The legislators have to make much tougher decisions now. It's a question of priorities. Do you give money to pregnant women to help the unborn, or do you give money to foster children who are already alive and with us?"

Hughes has proposed in the 1983 budget a 9 percent welfare grant increase that the legislature is likely to approve, partly because of a surprise $150 million surplus in the state treasury that was left over from last year. Hughes also announced that his administration had juggled dollars so that 3,000 welfare families could stay on the rolls even though new Reagan administration regulations should have cut them off.

But with the reduction of federal funds over the next two years, the governor has said the state will be unable to support welfare increases plus paying for all of its customary social service programs. Hughes and Hettleman blame the Reagan administration for placing an unfair financial burden on the states.

"The way 'new federalism' cuts across our programs is a sham," Hettleman says. "It's a rhetorical smokescreen to hide the fact that the Reagan administration is interested in cutting programs for the poor and vulnerable as deeply as they can get away with."

Maryland's welfare advocates have other legislative obstacles to increasing the state's welfare program. Baltimore's population is decreasing and so is its legislative representation. Rural areas, traditionally hostile to programs such as welfare that primarily benefit urban areas, are renewing their political power in the State House. And it is an election year, with legislators concerned that the public mood still favors less government and less spending, particularly on programs that provide financial help to the unemployed.

"I think the climate is very poor," Cade said when asked about the legislature's attitude toward future welfare spending. "It's always poor. But an election year makes it worse. And the year after Reagan is elected makes it even worse, because there seems to be a conservative-related antiwelfare flavor with the economy."

Now liberal legislators are working on a bill that would allocate $600,000 from the state's treasury to pay welfare benefits to women during the early stages of pregnancy, a measure that is likely to have support from such diverse groups as Planned Parenthood and Right to Life. Reagan withdrew the federal funds for that program.

But the bill that appears to have the best chance of passing is a "workfare" measure that the Hughes administration endorses. It would authorize the state to make some welfare recipients--the 30 percent who are not under 18 years old--work to pay off their benefits.

"I think it will pass," House member Kopp predicted. "It shows a concern about people on welfare who are right on the brink, but it is also sensitive to the public perception that welfare recipients should not get by for free."

Besides the bill's political appeal in an election year, it will be attractive to legislators because it has virtually no state expenses attached to it.

"Basically," a top legislative aide explained, "the message on welfare is that if they the legislature can afford to pay for it, they'll try to do it.