Tyson Foods Inc. has agreed to sell sow buying stations in Sioux City, Story City and eight other locations to win government approval of the company’s $8.5 billion takeover of Hillshire Brands Co.

The Justice Department’s anti-trust division, which has been reviewing the blockbuster deal for weeks, announced a settlement that requires Tyson to first detach its Heinold Hog Markets operations.

State...