Hillshire Brands has agreed to pay $4.2 billion for Pinnacle Foods Inc., which started in 2001 when a Dallas private equity firm bought Campbell Soup Co. castoffs Vlasic pickles and Swanson frozen dinners out of another company's bankruptcy, the firms said Monday.

With the acquisition of Pinnacle, which in subsequent deals expanded its product line to include Birds Eye frozen vegetables and Duncan Hines cake mixes, Chicago-based Hillshire is pushing further outside the deli case.

Among Hillshire's best-known brands are Hillshire Farm lunch meats, Jimmy Dean sausages, and Ball Park franks.

Pinnacle, which is based in Parsippany, N.J., and has an office in Cherry Hill, also owns Wish-Bone salad dressings, Celeste frozen pizzas, and Log Cabin syrup.

Hillshire chief executive Sean Connolly said during a conference call with analysts that the deal made sense. "Meats go with vegetables, sandwiches go with pickles," he said.

Dallas buyout firm Hicks, Muse, Tate & Furst paid $370 million for the Vlasic, Swanson, and Open Pit barbecue sauce brands owned by the former Vlasic Foods International Inc.

In 2003, Pinnacle bought Aurora Foods Inc. out of bankruptcy, adding Duncan Hines cake mixes, Log Cabin and Mrs. Butterworth's syrups, Lender's bagels, Aunt Jemima breakfast foods, and Mrs. Paul's - another former Campbell Soup brand - to its cupboard.

The Blackstone Group bought Pinnacle in 2007 for $2.16 billion from another set of private-equity owners. Blackstone took Pinnacle public in March 2013, but still owns 51 percent of the company.

The deal with Hillshire calls for Pinnacle shareholders to receive $18 per share plus half of a Hillshire share for every Pinnacle share they own. Including debt, the deal had an announced value of $6.6 billion.

The sale, which still requires shareholder approval, is expected to close by September. Combined annual revenues are expected to be $6.6 billion.