It was a love triangle—no, quadrangle—for the ages. Tyson Foods Inc. won its unsolicited bid for Hillshire Brands Co., but only after breaking up Hillshire’s deal for Pinnacle Foods Inc. and fending off a competing hostile bid from Pilgrim’s Pride Corp.

Just 15 days after Hillshire agreed to purchase Pinnacle for $6.6 billion, Pilgrim’s Pride Corp. swooped in with an unsolicited bid for Hillshire, and two days after that, Tyson weighed in. Neither wanted Pinnacle.