Lagunitas Brewing is selling its remaining 50 percent stake to Heineken International, which will place the California and Chicago-based brewery under full control of the world’s second-largest beer company. Heineken first bought half of Lagunitas in September 2015.

As a result of the deal, Lagunitas will become Heineken’s lead global craft brand, while its founder and executive chairman, Tony Magee, will take on a newly created role as global craft director for the Dutch company. Heineken owns more than 160 breweries worldwide.

“We’ll look to develop meaningful craft strategies and work with Heineken’s companies around the world to develop and deploy craft — good craft brands in the Lagunitas model,” Magee said. Magee announced the deal to employees in Petaluma, Calif., on Thursday morning and to customers in a 1,948-word blog post on his website, which is how he also announced the first sale.

“Some who don’t fully understand it all may say it is selling out,” Magee wrote. “Truth is that we did then, and are now ‘buying in.’ Money has value and equity has value too. I am using Lagunitas’ equity to buy deeper into an organization that will help us go farther more quickly than we could have on our own. You hafta imagine Jonah standing on the gunnel of the storm-tossed ship and intentionally leaping into the mouth of the whale to embrace the transformation and emerge to become his own destiny.”

Magee, who has been a critic of American craft breweries selling to Anheuser-Busch InBev, approached Heineken about the original 50 percent sale and also pushed to sell the other half because “this will accelerate growth and opportunities for Lagunitas,” he said.

There was an understanding with Heineken from the start that a full sale could be the eventual outcome, he said.

“We won’t be driving the brand to be bigger, faster, sooner, we’ll just be working more channels on the planet,” Magee said. “I’m not growing fast in any one market, but slowly in 30 markets all at once around the world.”

With more than 5,000 breweries in the United States, the craft beer arms race has turned global. Among the most aggressive has been Anheuser-Busch InBev, the world’s largest beer company, which has not only bought 10 craft breweries in the U.S., but craft breweries in England, Italy and Belgium. It also has aggressively expanded international distribution of Chicago’s Goose Island Beer Co., the company’s first craft acquisition, which was bought in 2011. In recent months, Anheuser-Busch InBev has launched Goose Island properties in Brazil, South Korea, London, Mexico and Toronto.

In a press release issued Thursday, Jean-François van Boxmeer, Heineken CEO and chairman of the executive board, said, “Our partnership with Lagunitas has been a great success and today’s announcement marks the next stage of an exciting journey. We look forward to accelerating the roll-out of Lagunitas to many more markets, and sharing craft beer with many more beer lovers around the world.”

Lagunitas CEO Maria Stipp, who previously reported to Magee, will now report to Marc Busain, president of Heineken in the Americas. Three American craft breweries in which Lagunitas has bought a stake will continue to report to Stipp. Magee has said he intends to invest in more American craft breweries. Terms of the deal were not released, though the initial 50 percent sale was reportedly worth close to $500 million.