Scott Olson/Getty Images

ABC News' Aaron Katersky reports:

Buyout firms Apollo Global Management, LLC and Metropoulos & Co. have agreed to purchase the Hostess and Dolly Madison cake brands, including Twinkies. The iconic snacks have been off the market since Hostess closed its plants in November and declared bankruptcy after its unions went on strike.

The proposed transaction includes the brands, five bakeries, and certain equipment for $410 million. The transaction requires US Bankruptcy Court approval. A hearing to consider approval of the sale will take place on March 19.

"We are very pleased to have the opportunity to bring back 'America's favorite snack'. Apollo and I are proud to be associated with such an outstanding set of brands," Dean Metropoulos, founder and CEO of Metropoulos & Co., said in a statement. "This transaction will ensure the beloved Hostess snack cakes can continue to be enjoyed for years to come. We look forward to returning the iconic Hostess products, including Twinkies, Ding Dongs, and HoHos, to consumers as soon as possible. In addition, we are also pleased to be able to provide employment opportunities for many people in cities around America."

Some 18,500 workers were left jobless by the closing. It was not immediately clear how many, if any, of those jobs would be saved. Apollo reportedly plans to outsource distribution to third-party drivers and produce the snacks in existing bakeries, rather than those that were shuttered.

An auction was to be held for the company's assets, but no bids were received. A spokesman for Hostess said the company had no comment on the lack of competing bids for the snack cakes, the Associated Press reported. Previously, Hostess CEO Greg Rayburn had predicted the process would be "wild and wooly."

A representative for Apollo, whose investments include the fast-food chains Carl's Jr. and Hardee's, declined to comment to the AP

Hostess had also canceled an auction for its Wonder and other major bread brands after no competing offers were made. Those breads are being sold to Flowers Foods, which is based in Thomasville, Ga., and makes Tastykakes and Nature's Own bread. The final sales of the breads and Hostess snack cakes are set to be approved in bankruptcy court on March 19.

McKee Foods, which makes Little Debbie snack cakes, was picked as the lead bidder for Drake's cakes, which include Devil Dogs, Funny Bones and Yodels. The deadline to submit competing offers for those snack cakes is Tuesday, with an auction set for Friday.

Hostess, based in Irving, Texas, stopped making its cakes and breads in late November after it announced it was going out of business and closing its plants following years of financial struggles.

The Associated Press contributed to this report.