China's Shuanghui Group has agreed to buy Smithfield Foods for around $5 billion in cash, a person with knowledge of the matter told Reuters on Wednesday.

Privately owned Shuanghui plans to fund the acquisition using debt, the person added, using both Chinese and foreign bank funding.

China is the world's biggest producer and consumer of pork and the third-largest market for U.S. pork. In recent months, a series of food safety scandals have dented consumer confidence.

The rationale for the deal, which will require U.S. federal review, is for Shuanghui to import Smithfield's pork into China, the person said.

The market capitalization of Virginia-based Smithfield is $3.6 billion, and the company has around $2.2 billion in debt.