Black Sheep Brewery has bought the York Brewery and four pubs from Mitchell's of Lancaster after it fell into administration earlier this month.
The purchase of the brewery, which has an annual turnover of £2.1m, will save more than 40 jobs.
The four pubs acquired by the company are the Last Drop Inn, the Tap Room and the Three Legged Mare in York, as well as Mr Foley's Tap House in Leeds.
Mitchell's of Lancaster, the parent company of both the brewery and a pub operating business, had a total of 13 pubs and one hotel when it fell into administration.
Andy Slee, chairman of the Black Sheep Brewery (pictured right), said: "This acquisition fits perfectly with our strategy of developing our presence in our Yorkshire heartland and owning pubs.
"Entering administration was worrying for the team at York Brewery, but our deal offers some comfort that its successful brand can be maintained, and the pubs can continue to operate. York Brewery complements our strong brands and by acting quickly we have been able to provide a good outcome for both organisations."
Steven Muncaster, managing director of Duff & Phelps (the administrators to Mitchell's of Lancaster) added: "Despite being a popular destination for both locals and tourists, York Brewery unfortunately continued to face cashflow pressures, ultimately resulting in it being placed into administration. However, we're delighted to have secured a sale for York Brewery, which is especially pleasing so close to Christmas."