Welfare rolls increased in 49 states in the past year as the economy slumped and governments tried harder to get food, cash and medical care to the needy.

An Associated Press survey of caseloads in the 50 states found that only Wisconsin had bucked the trend, partly because it has enacted pioneering programs to get people off welfare.

The increases in the benchmark welfare program, Aid to Families with Dependent Children, have come at a time when many states are already struggling to balance their budgets.

There also have been increases in virtually every state in the number of people receiving food stamps and Medicaid.

The biggest increases have come in economically battered New England and in the Southwest. The worst-hit state has been New Hampshire, where the number of families receiving AFDC increased 46 percent between September 1989 and September 1990 -- from 6,399 to 9,372.

"Those numbers are startling," said Tom Pryor, an administrator in New Hampshire's Office of Economic Services. "The primary reason that we see for that increase has been the decline in the New England economy."

Elsewhere in New England, AFDC caseloads went up 25 percent in Vermont, 19 percent in Connecticut, 14 percent in Maine and Rhode Island and 10 percent in Massachusetts.

Although the regional recession was the prod that pushed people onto welfare in the Northeast, other reasons were more important in other states.

For instance, changes in immigration law allowed more non-citizens onto the welfare rolls, an especially important factor in California and the Southwest.

The AFDC caseload was up 9 percent in California, where nearly 2 million people were receiving benefits in September. It rose 23 percent in Arizona, 17 percent in Texas and 14 percent in New Mexico.

Many states attributed the increase to efforts to reach out to poor people and enroll them in welfare programs. Some have adopted a "one-stop shopping" concept for social services, so that poor people seeking one form of public assistance are given access to others.

Delaware has "one-stop shopping," and also has tried to bring its services closer to the needy. "Now there are basically offices in everybody's neighborhood," said Phyllis T. Hazel, director of the state Division of Social Service.

Another factor in expanding the welfare rolls has been a federal mandate that makes Medicaid available to more pregnant women and infants. For example, Medicaid caseloads are up 46 percent in Indiana.

The Farm Belt and portions of the Deep South have come closest to resisting the trend. Farm states such as North Dakota, Iowa and Kansas have shown increases of less than 1 percent, as have such southern states as Mississippi, Alabama and Louisiana. The increase in Maryland was 8.2 percent, and 5.4 percent for Virginia.

Wisconsin's 2 percent decline in AFDC rolls in the past year followed three years of even larger declines. Officials attribute the drop to a strong state economy and experiments that require children of welfare recipients to stay in school and welfare mothers to work or attend school. The state provides day care for working welfare recipients.

"What we are seeing is the payoff of the efforts to encourage people to move from welfare to independence," said Elizabeth Snider-Allen of the state Division of Economic Support.

The rise in welfare caseloads in other states will be costly. The federal government pays the entire cost of food stamps -- an estimated $14.1 billion this year -- but states pay from 32.5 to 50 percent of the cost of AFDC.

"What will states do?" asked Marcia Howard, research director for the National Association of State Budget Officers. "They'll just pay it. They really don't have a choice. . . . And they will divert funds from other programs to do it, most likely."

The rising caseloads may also mean that states will be less likely to increase eligibility or benefits for AFDC, which already are well beneath the federal poverty level in most states. In Alabama, for instance, a single parent and two children receive $124 a month in AFDC benefits.