NEW YORK – Post Holdings Inc., the maker of Post cereals, agreed to acquire Michael Foods Group Inc., the Minnetonka maker of Crystal Farms cheese and processed egg and potato products, in a $2.5 billion deal with Goldman Sachs Group Inc.'s private-equity arm, people with knowledge of the matter said.

The deal may be announced as soon as Thursday, two people said, asking not to be identified discussing private information. The $2.5 billion deal includes the value of Michael Foods' debt, one person said. Shares of Post, the maker of Raisin Bran cereal, rose 5.7 percent Wednesday to close at $54.73, giving the company a market value of about $2.1 billion.

The purchase will expand Post's clout with retailers, broaden its distribution and give it products such as Simply Potatoes and Better'n Eggs in addition to Crystal Farms cheese. Even more, Michael transforms the cereal company into a more formidable player in protein, which is fast becoming a centerpiece of the healthy-eating trends that packaged-food makers are chasing.

Michael has annual net sales of more than $1.5 billion, according to its website. The company also drew a bid from Tyson Foods Inc., people with knowledge of the matter said in February.

Goldman Sachs' private-equity arm will reap a more than 260 percent gain on the sale, one of the people said. The New York-based firm invested about $360 million of equity in a $1.7 billion leveraged buyout of Michael from Thomas H. Lee Partners in 2010, according to regulatory filings. In addition to more than $990 million it will receive from the sale, Goldman Sachs has collected about $327 million in dividends from Michael Foods.

Thomas H. Lee, which retained a 21 percent stake in Michael after the sale to Goldman Sachs, will post more than a 300 percent gain on its 2003 investment in the company.

Post Chief Executive William Stiritz has been buying products such as Premier Nutrition supplements and Hearthside Food Solutions' organic cereals and snacks since Post was spun off from Ralcorp Inc. in 2012. The global active-nutrition category may grow at a compound annual rate of 7 percent from 2014 to 2017, Post has said.

The company was also weighing a bid for Ragu, the pasta-sauce maker that's owned by Unilever, one person said. Having secured the deal for Michael, it won't proceed with that bid, the person said. People with knowledge of the matter have said that Ragu may fetch $2 billion in a sale.

In February, Post agreed to buy the PowerBar and Musashi sports-nutrition brands from Nestlé SA to take advantage of increasing demand for health- and fitness-related snacks.

Andrew Williams, a spokesman for Goldman Sachs, declined to comment on the agreement. Brad Harper, a spokesman for Post, didn't reply to an e-mail seeking comment.

A California judge rejected pimping charges Friday against the operators of a major international website advertising escort services that the state attorney general has called the "world's top online brothel," citing federal free speech laws.