The judge overseeing the bankruptcy of Hostess Brands Inc., maker of Twinkies and Wonder Bread, has approved the company's plans to wind down after it failed to come to an agreement with its bakers' union.

Hostess said it will retain about 3,200 employees "to assist with the initial phase of the wind-down," meaning about 15,300 workers will lose their jobs starting Wednesday.

"The entire process is expected to be completed in one year," the company said in a statement. "The wind-down was necessitated by an inflated cost structure that put the company at a profound competitive disadvantage. The biggest component of the company's costs was its collective bargaining agreements that covered 15,000 of 18,500 employees."

Judge Robert Drain of the U.S. Bankruptcy Court in White Plains, N.Y., will allow Hostess to return its excess materials, like ingredients and packaging, and implement a "non-executive employee retention plan to ensure the company has the necessary personnel to implement the wind-down."

The two parties were in talks on Tuesday in a last-ditch effort to save the jobs, but an agreement was not made.

In a statement late Tuesday, Hostess said it would not comment on the breakdown in talks other than to say that mediation "was unsuccessful." A lawyer for the bakers union said he had no comment, citing mediation ground rules.

A handful of companies have reportedly expressed interest in buying Hostess Brands, including private equity firm Sun Capital Partners Inc., based in Boca Raton, Fla. Sun Capital did not immediately return a request for comment.

Last week, Hostess said it would move to wind down its business and start selling off its assets in bankruptcy court. The company cited a crippling strike started on Nov. 9 by the Bakery, Confectionery, Tobacco Workers and Grain Millers International (BCTGM) Union, which represents 30 percent of Hostess workers. Hostess had imposed a contract that would cut workers' wages by 8 percent. The BCTGM said the contract would also cut benefits by 27 to 32 percent.

"We deeply regret the necessity of today's decision, but we do not have the financial resources to weather an extended nationwide strike," Rayburn said in a statement last Friday. "Hostess Brands will move promptly to lay off most of its 18,500-member workforce and focus on selling its assets to the highest bidders."

"The Board of Directors authorized the wind-down of Hostess Brands to preserve and maximize the value of the estate after one of the company's largest unions, the Bakery, Confectionery, Tobacco Workers and Grain Millers International Union (BCTGM), initiated a nationwide strike that crippled the company's ability to produce and deliver products at multiple facilities," Hostess said in a statement.

A 5 p.m. deadline came and went without workers returning on Nov. 15.

Hostess, which is privately owned by investment firms, has struggled in recent years with two bankruptcy filings. The company said it "has done everything in its power to pursue a reorganization of its business as a going concern, including spending the better part of 18 months negotiating with its key constituents to obtain a consensual agreement."

"Hostess Brands is making a mockery of the labor relations system that has been in place for nearly 100 years," union president Hurt said in a statement last week. "Our members are not just striking for themselves, but for all unionized workers across North America who are covered by collective bargaining agreements."

The union, which represents more than 80,000 industry workers, maintains that the company's policies will bring its members back to workplace standards of the 1950s.

The wind-down means the closure of 33 bakeries, 565 distribution centers, approximately 5,500 delivery routes and 570 bakery outlet stores throughout the United States, the company said.

Last Thursday, the Teamsters Union recommended that BCTGM vote by secret ballot over whether workers wanted to continue their strike.

The teamsters said that the BCTGM members had previously voted "without complete information," with over 90 percent rejecting Hostess' contract offer.

"The BCTGM leaders are putting teamster members in a horrible position -- asking them to support a strike that will put them out of a job when they haven't even asked all their members to go on strike," the teamsters said in a statement last week.

ABC News' David Wright and Alex Stone contributed to this report. The Associated Press contributed to this report.