NEW YORK (AP) — PepsiCo is buying the energy drink maker Rockstar Energy Beverages for $3.85 billion.

PepsiCo and Coca-Cola have moved aggressively in their pursuit of consumers that have a much wider variety of drinks to choose from than several ago. Both must compete with smaller seltzer, soda, sparkling juice and energy drink makers that each market to a subset of consumers.

Coca-Cola has branched out from its Classic Coke to keep customers who have given up, or cut back drastically, on sugary drinks. The company said in its most recent quarter that Coca-Cola Zero Sugar had double digit sales gains last year. Coffee and tea sales — boosted by the company’s 2018 acquisiton of Costa Coffee — grew 4% in the final three months of 2019.

The acquisition announced Wednesday expands PepsiCo’s portfolio of energy drinks, which already includes Mountain Dew’s Kickstart, GameFuel and AMP.

Rockstar, founded in 2001, makes 30 variations of drinks and is sold in more than 30 countries. It is based in Las Vegas. PepsiCo and Rockstar have had a distribution agreement in North America since 2009.

The deal is targeted to close in the first half of the year.