BEIJING, Dec 18 (Reuters) - Chinese animal feed and hog producer New Hope Liuhe plans to raise 4.2 billion yuan ($589.13 million) by selling majority stakes in two of its units, it said late on Friday, as it seeks to replenish capital after months of losses from pig farming.

New Hope Liuhe said it would sell a 51% stake in its poultry breeding and processing business Shandong Zhongxin Food to state-owned China Animal Husbandry Group for 2.7 billion yuan in cash.

China Animal Husbandry is a major producer of animal vaccines and is also involved in breeding and feed additives.

New Hope Liuhe said it would also sell a 67% stake in its Beijing food processing unit for 1.5 billion yuan to Hainan Shengchen Investment Co, a firm owned by New Hope Investment Group, an investment arm founded by New Hope Group.

Privately-owned New Hope Group is the parent company of New Hope Liuhe.

The listed company, China's third-largest hog producer, reported losses of 3.88 billion yuan in the first three quarters of this year, as weak demand and oversupply kept hog prices below production costs for most of this year.

It told shareholders in July that it planned to bring in state-backed investors to take -stakes in its poultry and food units.

The stake sales will ensure the company's competitiveness and sustainable development, New Hope Liuhe said.

A shortage of working capital has become an increasing problem for all pig breeders, with hog prices not expected to recover to profitable levels until well into 2024.

New Hope Liuhe's shares fell 0.64% on Monday morning to 9.25 yuan and are trading at the lowest level since early 2019. ($1 = 7.1292 Chinese yuan) (Reporting by Mei Mei Chu and Dominique Patton; Editing by Jamie Freed)