Coty Inc. agreed to buy 40-plus Procter & Gamble Co. beauty brands for about $12.5 billion in a deal that would more than double its sales and transform it into one of the world’s largest cosmetics companies.

The transaction will be conducted as a Reverse Morris Trust, meaning P&G will spin or split off the business, which will then merge with a Coty subsidiary, the companies said in statements Thursday. The arrangement is meant to reduce taxes for the companies’ shareholders.

The acquisition will add Hugo Boss and Gucci to Coty’s fragrances offerings and CoverGirl and Max Factor to its cosmetics portfolio. The deal also brings Coty into the hair-color business with P&G’s Wella and Clairol brands. All told, the combined businesses have annual revenue of more than $10 billion, compared with $4.55 billion for Coty in its most recent fiscal year.

For P&G, the sale is part of a plan to reinvigorate growth by divesting slower-selling brands. Chief Executive Officer A.G. Lafley is exiting as many as 100 product lines that aren’t central to the company’s household and personal-care focus.

Last year, P&G agreed to sell portions of the Camay and Zest soap brands to Unilever, the Duracell battery business to Berkshire Hathaway Inc., and most of its pet-food business to Mars Inc. The company also sold the Rochas brand to Interparfums in March. 

Other P&G divisions that could be candidates for sale include Braun, the maker of electric shavers and toothbrushes, Bloomberg reported in November.

Coty fell 6.1 percent to $29.60 at 10 a.m. in New York. Cincinnati-based P&G climbed 0.9 percent to $81.70.

New York-based Coty was founded in 1904 in Paris by Corsica-born Francois Coty. The company, controlled by Austria’s billionaire Reimann family, owns the color cosmetics brand OPI and has a licensing agreement to sell the Adidas line of skin- care products. Its IPO in 2013 raised about $1 billion on behalf of existing holders.