New Belgium Brewing is part of a group acquiring San Francisco's Magnolia Brewing Co., the Fort Collins brewery announced Thursday.

The Fort Collins-based craft brewery teamed with Belgian brewery Oud Beersel and Elysian Brewing co-founder Dick Cantwell on the deal, which is part of Magnolia's bankruptcy proceedings. The transaction is scheduled to be finalized in September.

Magnolia Brewing, which has two San Francisco locations, will retain its name and branding.

"We’ve been looking for ways to diversify our assets and expand our community,” said Kim Jordan, New Belgium's co-founder and executive chair. "We’re excited about the possibilities and look forward to continuing our journey while honoring Magnolia’s history and presence.”

Jordan has a home in San Francisco that she shares with Cantwell, who is her boyfriend.

Cantwell will take over as Magnolia's head brewer. He co-founded Seattle's Elysian Brewing in 1996 but left the company in 2015 after being forced to sell the craft brewery to Budweiser parent company Anheuser-Busch InBev. Many Elysian products are now produced at the Fort Collins Anheuser-Busch brewery.

“I’m tremendously excited to be back in the beer business and looking forward to working with the team at Magnolia to develop new beers and new ideas,” Cantwell said in the statement.

Magnolia Brewing was founded in 1997 in San Francisco's famous Haight-Ashbury district. In 2014, the operation opened a barbecue brewpub called Smokestack.

The brewery filed for Chapter 11 bankruptcy in November 2015.

Many of Magnolia's flagship beers are expected to remain in production, while other new beers will be added. Oud Beersel, founded in 1882, and New Belgium, founded in 1991, plan to ship lambic-style beers to Magnolia for blending.

Magnolia Brewing founder Dave McLean will stay on as an employee.

“I'm incredibly grateful for this opportunity to see Magnolia start a new chapter," McLean said in the statement. “Magnolia has had quite a journey in San Francisco for nearly two decades, including some very challenging and difficult times in recent years.”

The acquisition was announced on the same day Corona-maker Constellation Brands bought out Florida craft brewery Funky Buddha Brewery.

New Belgium is considered the country's fourth-largest craft brewery. The operation reached 50-state distribution earlier this year.

Follow Jacob Laxen on Twitter and Instagram @jacoblaxen.

More:New Belgium brewmaster opens new Fort Collins craft brewery