PepsiCo Inc. agreed to buy energy-drink maker Rockstar Inc. for $3.85 billion as the U.S. soft drink and snacks giant seeks to expand its beverage range amid waning appetite for traditional sodas.

The deal is one of the first strategic moves by PepsiCo Chief Executive Officer Ramon Laguarta since he took over from Indra Nooyi in 2018. Pepsi and Las Vegas-based Rockstar have had a distribution agreement in North America since 2009.

Pepsi and rival Coca-Cola Co. have been racing to expand their lineups of faster-growing drinks as consumers shun sugary beverages. Pepsi’s energy portfolio already includes Mountain Dew’s Kickstart, GameFuel and AMP while Coca-Cola announced Coke Energy last year, adding to the stake it owns in Monster Beverage Corp., a top-selling brand. Coke also acquired U.K. chain Costa Coffee in 2018 and has debuted a line of spirit mixers.

“Over time, we expect to capture our fair share of this fast-growing, highly profitable category and create meaningful new partnerships in the energy space,” Laguarta said today in a statement confirming the deal. Dow Jones reported earlier that Pepsi was nearing a deal for Rockstar, citing unidentified people familiar with the situation.

Energy drinks, known for their high sugar and caffeine content, have been a relative weak spot for both Coke and Pepsi. Austria’s Red Bull GmbH dominates the category, selling about 7.5 billion cans annually. About 700 million of those are sold in the U.S., compared with just over 70 million cans of Rockstar.

Through sponsorships, the energy beverage industry is closely associated with extreme sports, which has been a boon for brands such as Monster. Last month, the company said its full-year sales rose 10%.

Rockstar was founded by the entrepreneur Russell Weiner in 2001 and is the creator of the world’s first 16-ounce energy drink.

Pepsi also entered into an agreement which will provide about $700 million of payments related to future tax benefits associated with the transaction, payable over up to 15 years, it said in the statement. The company doesn’t foresee the deal affecting revenue or earnings per share this year. The transaction is expected to close in the first half of 2020.

Pepsi was advised by Centerview Partners Holdings LP while Rockstar worked with Goldman Sachs Group Inc.