The grocery industry had another view.
"It's a milk tax," said Alan M. Rifkin, a lobbyist for retailers and milk processors.
Rifkin argued that instead of helping farmers, the legislation would hurt consumers who will end up paying more for milk.
"Who pays for the price support? It's the consumer who pays in this instance," he said.
Since 1991, the state has lost 25 percent of its dairy farms, which pour about $200 million into the state economy each year, according to the Department of Agriculture.
The milk issue has local impact. Washington County is the second-largest dairy-producing county in the state, with 196 farms. Frederick County is the largest, with 236 farms.
"Small family farms need the compact to exist," said Michael Wilcom, a Frederick County farmer.
The legislation would allow Maryland to join the Northeast Interstate Dairy Compact, a federally created organization that has been setting dairy prices in the New England states since last July.
In those states, the average retail price has risen by a dime per gallon, officials said.
"It's working well in New England and we're hopeful other states will look into it," said Jonathan L. Healy, commissioner of the Massachusetts Department of Food and Agriculture.
In West Virginia, the Senate passed a bill Tuesday that would allow the state to join a similar compact with 14 Southern states. The bill already passed the House, but the Senate amended it and sent it back, according to The Associated Press.
Boyd Cook, a Boonsboro resident who served on a state dairy task force two years ago, testified in favor of the legislation, saying there is a great difference between prices charged in Hagerstown and those charged in Baltimore.
"This law provides stability for both the dairy farmer and the processor," Cook said.
Jere DeBaugh, a Boonsboro dairy farmer, said the compact also will help level the month-to-month price fluctuations.
"All we are asking is we get a little stability to our market price," DeBaugh said.
John M. Schnittker, senior economist for the nonprofit Public Voice for Food & Health Policy, testified against the bill, saying it would harm poorer families who dedicate a greater percentage of their family budgets to food. He also said the bill would provide a bigger economic windfall to large farms and help them swallow the small farms.
"The effect over the long term will be to hurt small dairy farms," Schnittker said.
Last year the farm community pushed for a different type of price support bill, but that was defeated after retailers and others waged a massive lobbying campaign.
Many of the same people are battling the current legislation, including the Landover, Md.,-based Giant Food Inc. Barry F. Scher, Giant's vice president of public relations, argued that the state should consider tax cuts and subsidies for farmers before offering price supports.
"There are other ways to help the dairy industry in Maryland," he said.