Maryland is poised to join more than three-dozen other states that allow residents to have bottles of their favorite wine shipped directly to their doorsteps.

Both chambers of the General Assembly have signed off on legislation to legalize wine shipment from vineyards to consumers. Residents will be able to order up to 18 cases of wine per-year, per-household, according to the pair of bills.

Lawmakers must work through minor differences between the two versions of the legislation before the session ends at midnight April 11, to send a bill to Gov. Martin O’Malley (D).

The governor, who favors Guiness over Chardonnay, said Wednesday he would sign the bill.

The powerful alcohol industry had long resisted efforts to legalize direct wine shipment in Maryland. This year, representatives from the industry for the first time agreed to a compromise that allows shipments from vineyards, but not from out-of-state retailers or on-line specialty Web sites as some consumers had hoped.

Momentum for the measure comes after wine connoisseurs in Maryland became more organized in their lobbying efforts, and follows a study by the state comptroller that dispelled concerns from opponents that such a measure would make it easier for minors to access alcohol. For years, scores of residents in the Washington suburbs have tried to get around the prohibition by sending bottles to their offices in the District or to the homes of friends in D.C. and Virginia, which allow direct shipment.