The Boston-based parent company of Harpoon beer has agreed to buy Vermont-based Long Trail Brewing for an undisclosed price.

Under the terms of the deal, Massachusetts Bay Brewing will acquire the Long Trail, Otter Creek and Shed brands. Those beers will now all be made at Harpoon’s existing brewery in Windsor. Shoreham-based Whistlepig Whiskey will take over the Otter Creek and Shed brewery in Middlebury.

Mass. Bay will continue to operate the Long Trail Riverside Pub in Bridgewater Corners, which is where Long Trail is currently brewed. Harpoon’s parent company will also continue to run the Otter Creek Brewing Pub & Beer Garden in Middlebury.