But a month ago, after a Senate committee defeated a version of the bill, even the most ardent supporters of the measure were ready to start flying the white flag.
"Everybody was feeling pretty low about the whole issue," said Del. Paul S. Stull, R-Frederick.
There was still an "ember" of hope in the form of a House bill that hadn't yet been voted on, Stull said. Given what happened in the Senate, it likely would have stayed that way.
But he and other rural members on the House Environmental Matters Committee kept pushing for the panel and then the full House to vote on the bill. Meanwhile, dairy farmers wrote letters and called lawmakers in a desperate attempt to give the legislation a second life.
"I can't say enough good things for what the folks have done out there," Stull said.
They played up the underdog role, fighting a battle against grocery retailers, whose well-heeled lobby labeled the dairy bill a "milk tax" and routinely greeted lawmakers heading to the State House with fliers, charts and newspaper editorials backing their position.
"It was almost a David versus Goliath kind of thing," said Del. Sue Hecht, D-Frederick/Washington.
But sympathy alone doesn't win votes. To do that, the bill was sweetened to include a two-year "sunset" clause that meant the legislation would lose its effect in two years unless further legislative action was taken.
Supporters also came up with a new argument: The bill was good for the environment; no one wants to see more dairy farms going out of business and being turned into housing developments.
"That was completely different and had not been tried before," said Del. J. Anita Stup, R-Frederick/Washington.
Some lawmakers said they were swayed to vote for the bill because not doing so would have given farmers a double-whammy this year as the General Assembly also moved to place tighter controls on agriculture runoff.
"I think there's this feeling . . . that we're really putting, potentially, a heavy burden on the agriculture community," Sen. Christopher J. McCabe, R-Howard, said early this month.
And there was also growing concern that if Maryland didn't join the compact of northeastern states setting minimum prices paid to farmers for milk, farmers there would have an unfair advantage.
But the turning point might have came on the afternoon of April 1, when Gov. Parris N. Glendening walked across the street from his State House office to the James Senate Office Building and asked senators to give the bill a second look.
"I'd say he was a very big factor in turning this around, yes," said Sen. John W. Derr, R-Frederick/Washington.
It was a rare bit of personal lobbying for a governor to make, and some senators who previously voted against the bill said they changed their votes based solely on Glendening's appeal.
"The governor single-handedly turned this thing around," said Alan M. Rifkin, a lobbyist representing some of the grocery chains and milk processors opposing the bill.
Glendening denied his support of the dairy bill was tied to the tighter farm runoff controls, which are aimed at preventing future outbreaks of the fish-killing Pfiesteria microbe that appeared on the lower Eastern Shore last summer.
"That's baloney, because last year, the governor supported this bill before anyone heard of Pfiesteria," said Glendening spokesman Ray Feldmann.
In both the House of Delegates and the Senate, the coalition of rural lawmakers needed some votes from Baltimore City and other metropolitan lawmakers to get them over the top.
They got them.
Sen. Nathaniel J. McFadden, D-Baltimore, unabashedly noted the support his rural colleagues gave for $254 million in city school funding last year as the chief reason for his sudden interest in helping dairy farmers.
"Sometimes in this business, you can't forget the people who helped you," McFadden said.
After the Senate vote Friday, those on other side of the issue had a less-flattering view of the legislative wheeling and dealing.
"There was more milk being traded than on the Commodities Exchange Commission," said Denis R. Zegar, president and CEO of the Mid-Atlantic Food Dealers Association Inc.
Even now, though that the Maryland bill has passed and Glendening's signature is assured, Maryland farmers must wait.
That's because before Maryland can join the dairy compact, Pennsylvania must agree to join. There has been an effort to get such legislation passed in Pennsylvania, but the status of that measure at present couldn't be determined on Saturday.