NEW YORK (AP) — The maker of Cheerios also wants to fill dog bowls: General Mills said Friday that it plans to buy high-end pet food maker Blue Buffalo for $8 billion.

It’s a return to the pet business for the more than 150-year-old company, which used to sell food for cats, dogs and birds back in the 1950s. And it joins other food makers in the pet business: Fruit-spread maker The J.M. Smucker Co., for example, owns Kibbles ’n Bits and Meow Mix.

The deal is also a way for General Mills to further diversify its business as more people seek less-processed foods, even for their furry friends.

“We’ve been serving all family members” for years, said General Mills CEO Jeff Harmening. “And pets are part of the family.”

General Mills, whose revenue has fallen for three straight years, has been buying up food brands with fewer artificial ingredients as it deals with dwindling demand for its cereals and yogurts. In recent years, it bought Annie’s organic snacks and Epic meat bars, which are made from bison, wild boar or lamb. The Minneapolis-based also makes Pillsbury dough, Yoplait yogurt and Lucky Charms cereal.

Blue Buffalo says its dog and cat foods are free of artificial colors and contain fruits and vegetables. The company, founded in 2002, went public in 2015, the same year it became the best-selling pet food brand in the U.S., according to market research company Euromonitor. Blue Buffalo Pet Products Inc.’s revenue rose 11 percent in 2017 from the year before.

General Mills Inc. will pay $40 for every Blue Buffalo share. That’s a 17 percent premium to the pet food company’s Thursday closing price of $34.12.

Once the deal closes, which is expected by the end of May, Blue Buffalo will be run as a new pet operating segment at General Mills. Blue Buffalo will continue to operate out of its Wilton, Connecticut, headquarters.

Shares of Blue Buffalo surged 17 percent to close at $40 Friday. General Mills shares fell 3.6 percent to $52.98.