Minnesota's largest breweries can soon start selling beer to their customers to-go, under a last-minute deal struck at the divided Capitol.

The legislative agreement released Thursday would lift a production cap on five breweries that has kept them from selling their product in growlers or other containers for customers to take home. It also allows licensed craft distilleries to sell up to 750 milliliters of their product — the size of a standard liquor bottle — per day to customers, doubling what they can sell now.

The deal, which cleared a joint House Senate committee Thursday, still needs to pass the full Legislature before session adjourns on May 23, but top negotiators were optimistic.

"This is a big win for craft breweries and craft distilleries and for Minnesotans," said Rep. Zack Stephenson, DFL-Coon Rapids, the chair of the House Commerce Committee who worked on the deal. "We are finally going to do what Minnesotans have been wanting us to do for years."

Currently, state law prevents breweries from selling beer to-go once they hit a production level of more than 20,000 barrels of beer annually. Only five breweries in the state — Surly, Summit, Schell's, Fulton and Castle Danger — produce more than that each year and bump up against the limit.

The bill would raise that cap to 150,000 barrels, and allow brewers to sell up to 128 ounces, or one gallon, of beer per customer, per day.

"I'm always happy when we can help the small businesses and entrepreneurs who are passionate about their craft, and the enthusiasts that support them, thrive in our state," said Senate Republican Majority Leader Jeremy Miller.

Stephenson said other changes being considered were taken out of the final deal. The bill does not include an provision to create a liquor industry advisory council, which would have vetted proposals to change the state's alcohol laws, forwarding any consensus ideas to the Legislature to consider.

Breweries have been pushing for years to lift the production cap and start selling growlers to-go, but Minnesota is famously slow to change its liquor laws. It took more than 150 years for the state to lift its ban on selling alcohol on Sundays in 2017.

The bill does make other small changes to state liquor laws, including allowing cities to issue on-sale liquor licenses to amateur baseball teams and resorts. It also allows temporary on-sale licenses for county fairs that run more than four days.