(Reuters) - Candy and pet food conglomerate Mars Inc is buying veterinary hospital operator VCA Inc WOOF.O for $7.7 billion in a deal that will give the maker of Pedigree pet food an even bigger share of the $4 billion global pet healthcare market.

The deal will help family-owned Mars, better known for candies such as M&Ms and Snickers, add about 800 pet hospitals to its network of more than 900 clinics, which includes the 61-year-old Banfield pet hospital chain.

McLean, Virginia-based Mars is already the biggest pet food company in the world - it held a quarter of the $71.77 billion global pet food market as of 2015 - followed by Nestle SA NESN.S, the maker of the Purina cat and dog food brand.

Mars and Nestle also hold the mantle of being the No.1 and No.3 confectionary makers in the world, respectively, according to Euromonitor data.

Candy makers have been diversifying their business as calorie-conscious consumers increasingly shun sugary sweets, a trend that has weighed on the $183 billion global confectionery market.

Rival Hershey Co HSY.N is also expanding beyond chocolates - it bought Krave, a beef jerky maker, in 2015, while Mondelez International Inc MDLZ.O recently introduced Good Thins, its first snack brand in more than a decade.

“While most of Mars Pet is focused on food, the firm had long dabbled in pet healthcare services,” Morningstar analyst Debbie Wang wrote in a note.

Slideshow ( 2 images )

“Considering that growth in pet healthcare has averaged 7-8 percent over the long term, the addition of VCA would help Mars tap into this appealing market.”

Mars said it would offer $93 per share, a premium of 31.4 percent to VCA’s Friday closing price. Including debt, the deal is valued at $9.1 billion.

VCA’s shares were up 19.8 percent at $90.60 in afternoon trading on Monday. The company, founded in 1986, had annual sales of $2.13 billion in 2015.

Mars, which also owns the BluePearl chain of emergency and specialty veterinary care clinics, had annual pet food sales of $17.80 billion in 2015, according to Euromonitor data.

Morgan Stanley & Co. LLC and BDT & Co were Mars’ financial advisers, while Skadden, Arps, Slate, Meagher & Flom provided legal advice.

Barclays was VCA’s financial adviser and Akin Gump Strauss Hauer & Feld LLP and Potter Anderson Corroon LLP were legal advisers.