Nestle SA is selling part of its stake in L’Oreal SA back to the cosmetics maker for 8.9 billion euros ($10 billion), scaling back a more than four-decade link between two of Europe’s biggest consumer-goods companies. 

Nestle will own 20.1% of the French maker of shampoos and lipsticks after the sale of 22.3 million shares for 400 euros each, down from 23.3% at the end of last year. It’s the first time Nestle has reduced its holding since 2014, when it disposed of an 8% stake for 6 billion euros.

Shares in Nestle rose as much as 2% in Swiss trading, bringing its gain this year to 19%. L’Oreal advanced as much as 2.1% in Paris. The stock has risen about 37% since the start of 2021 and is on track for the best year since 1998.

The two companies have been locked in a partnership since 1974, a protective move at the time to shield L’Oreal from possible French nationalization. The sale of part of its stake follows years of speculation that Nestle would cut its investment as Chief Executive Officer Mark Schneider overhauls the world’s largest food company.

The move is good for both companies, because it reduces Nestle’s exposure to L’Oreal that had become “troublingly high” at about 16% of its market capitalization, according to Martin Deboo, an analyst at Jefferies. And L’Oreal keeps ownership in the family, he added.

“It puts another tick on the score sheet of Mark Schneider’s seemingly inexorable transformation program at Nestle,” Deboo wrote in a note after the announcement was made late Tuesday. “The question on our minds tonight is whether this is merely a one-off, or the start of a phased exit from L’Oreal by Nestle, unfolding over the coming years.”

For L’Oreal, it’s the company’s largest-ever transaction. It plans to cancel the repurchased shares. 

Schneider has made bold moves since taking the helm in 2017, selling lagging businesses such as the U.S. confectionery unit and mass-market bottled-water brands, as well as Nestle’s skincare business. Instead, he’s focused on faster-growing areas like coffee, petcare and consumer health. His $7.15 billion deal for the rights to sell Starbucks coffee products in supermarkets, restaurants and catering operations has boosted coffee sales while Nestle has also pushed further into vitamins and supplements.

Nestle remains “fully supportive” of L’Oreal’s value creation strategy, according to a statement, and will retain its two positions on its board. 

Nestle will start a $20 billion share buyback program next month, and would adjust it in case of any big M&A moves. Schneider in October underlined the company’s preference for mid-sized acquisitions because they’re easier to integrate, though he said Nestle is open to deals of any size. 

L’Oreal’s other main investor is the Bettencourt Meyers family, which is among the wealthiest in France. The family’s stake will be raised to 34.7% from 33.3% as a result of the transaction, according to a statement from L’Oreal. 

In October, Nestle raised its full-year sales forecast, predicting the fastest sales growth in a decade as the Swiss company benefits from a revival in travel and dining out. Sales should rise by 6% to 7% on an adjusted basis, the company said, finally achieving the pace of growth that Schneider set for himself when he took over. 

L’Oreal’s lead adviser for the deal was Centerview Partners. Credit Suisse advised Nestle, a person familiar with the deal talks said. 

“Nestle is using all levers to create value for shareholders,” Vontobel analyst Jean-Philippe Bertschy wrote in a note. “The proposed transaction is clever, allowing Nestle to keep all opportunities with regard to M&A and returns of cash to shareholders.”