Oreo has a sweet tooth for Tate's cookies.

Mondelez (MDLZ), the owner of Oreo, Chips Ahoy and Ritz Crackers, plans to buy Tate's Bake Shop for $500 million. The deal was first reported by The Wall Street Journal.

The deal will add Tate's thin-and-crispy chocolate-chip cookies to Mondelez's lineup. Tate's cookies sell for higher prices than Oreo and Chips Ahoy. They are marketed as natural, authentic "crafted baked goods" from Southampton, New York.

Mondelez will keep Tate's as a standalone business, an attempt to protect the cookies' niche appeal among customers.

CEO Dirk Van de Put said Tate's would get his company into the "fast-growing premium cookie segment." Tate's does not disclose annual sales, but said in a news release that revenue has quadrupled over the past five years.

Mondelez (MDLZ)'s older, mass-produced names, which also include Honey Maid and Wheat Thins crackers, Sour Patch Kids, and Trident and Stride gum, need a boost. The company's stock is down 9% this year. Sales fell in North America last quarter.

Traditional snack and chocolate companies are struggling as Americans experiment with upstart brands that offer fresh foods, new ingredients and catchy marketing and packaging, both online and at supermarkets such as Whole Foods.

Related: Coke and Hershey's costs are going up. Will you pay more?

Kraft Heinz (KHC), Hershey (HSY), Nestle (NSRGF), Campbell Soup (CPB), and General Mills (GIS)' stocks have all lost double digits in 2018. Nestle said on Monday that it's paying more than $7 billion to sell Starbucks' (SBUX) packaged coffees and teas outside the United States.

Mondelez has been looking for ways to grow in recent years. It tried to buy Hershey in 2016, but abandoned the bid.

CEO Van de Put, who took over for longtime chief executive Irene Rosenfeld last night year, has ordered a strategic review of Mondelez's brands. The company is expected to sell some of its underperforming businesses.

Related: Oreo maker is worried about rise of populism

"Today's consumers eat differently, shop differently and seek different experiences," Van de Put said at a conference in February. "We have to be more nimble, innovative and forward-looking than ever before."

One Wall Street analyst, Pablo Zuanic at Susquehanna, believes Mondelez could going on a buying spree to try to create an international chocolate empire. Chocolate accounted for more than 31% of Mondelez's global sales in 2017.

"With Budweiser (BUD) and [JAB Holding] consolidating the global beer and coffee industries, respectively, we think there is room for someone to do the same in chocolate," Zuanic wrote in a report last week.