Virginia bottlers and retailers, shaken by a committee vote that challenged their decade-long influence over the Virginia General Assembly, reasserted their power today as the Virginia Senate crushed, by a 24-to-12 vote, a bill that would have banned throwaway beer and soda bottles and cans.

The mandatory bottle-deposit bill, championed by farmers and environmentalists, would have required consumers to pay a dime deposit for each container and return the empties to the store. Officials in the bottling, supermarket and beer distributing industries lobbied intensively against the measure after the Senate Agriculture Committee approved it for the first time last week, 8 to 7.

"This issue ceased to be one of bottles and cans, but is now one of raw influence and politics," argued Sen. Madison E. Marye, a farmer and businessman from Southwest Virginia who sponsored the bill. "Do we owe our allegiance to the beer lobbyists who can contribute thousands of dollars to our campaigns or to the hard-working taxpayers of this Commonwealth who pay for picking up the litter they generate?"

Opponents of the bill argued it would cost them money and cost Virginia jobs, and they expressed delight at their margin of victory. "Two to one, that's good," said Joseph Guiffre, an Alexandria beer distributor and loyal Democratic Party contributor who once ordered his employes to attend a bottle-bill hearing. "I wish it could be 10 to 1. We don't like having to come down here every year for ten years, eleven years in a row."

The bill's foes were aided by the votes of four senators who listed retail companies among their legal clients and Sen. Frank W. Nolen of Augusta -- who works for Reynolds Metals Co., a Richmond-based corporation that is a major can manufacturer and helped coordinate the lobbying against the bill. Two senators with ties to the bottling or distributing industry abstained, and three others voted for the measure.

The vote took place the day of the Virginia Beer Wholesalers' annual reception for the General Assembly and four days after the Virginia Food Dealers invited legislators to an elegant dinner. The parties crowned a lobbying campaign that included telegrams from Safeway and the Fairfax Chamber of Commerce, visits from beer distributors across the state and scores of telephone calls from glass workers and mom-and-pop grocers who said the bill would hurt small businesses.

"It was just too much pressure," said Fairfax Sen. Clive L. DuVal 2nd, a Democrat who favored the bill. "It's just before an election, and people didn't want to see their opponents heavily financed."

DuVal was joined in support of the bill by Northern Virginia senators Joseph V. Gartlan Jr. (D-Fairfax), Edward M. Holland (D-Arlington), Wiley F. Mitchell Jr. (R-Alexandria) and Charles L. Waddell (D-Loudoun). Fairfax Democrats Adelard L. Brault and Richard L. Saslaw voted to kill the measure, while Charles J. Colgan (D-Prince William) abstained.

Colgan, who said he would have opposed the bill, did not participate in the vote because his partners in the airline business are also in the soft-drink-bottling business. Another senator, Charlottesville lawyer Thomas J. Michie Jr., abstained because he represents a beer distributor. Nolen said he voted against the bill, despite his connection with Reynolds, because it was too important to his district for him to abstain.

Nine states have enacted bottle bills, while four states defeated similar bills in multimillion-dollar referendum battles last fall. Environmentalists in Virginia said they were happy their bill reached the full Senate this year.

"We've come a long way," said Pat Franklin, a Fairfax resident and leader of Virginia for Returnables. "All we could really hope for realistically was a count. We've got every senator on record, and hopefully the people in the state will remember next November."

DuVal said he believes deposit advocates now might do best to take the campaign out of the General Assembly to a statewide referendum, but he did not predict a quick victory.

"This is a state where industry has a lot of clout," DuVal said. "It just takes time."