Troubled Dakota Plains Holdings has filed for Chapter 11 bankruptcy and plans to sell substantially all of its assets to a Houston-based company for $8.55 million.

Wayzata-based Dakota Plains, which loads oil into rail cars in North Dakota, has been bleeding red ink while its stock has been trading at less than 1 cent. Six of Dakota Plains' subsidiaries filed Chapter 11 Tuesday along with their parent company in U.S. Bankruptcy Court for the District of Minnesota.

While Dakota Plains has been floundering for some time, it has been in the news over the past year mostly because its two co-founders — Ryan Gilbertson and Michael Reger — have been targets of a federal securities investigation surrounding the company's initial public offering.

BioUrja Trading of Houston has made a "stalking horse" bid of $8.55 million for Dakota Plains, essentially setting a floor price for the company's assets during its bankruptcy proceeding. Other bidders could emerge. Chapter 11 allows a company to reorganize its finances while remaining shielded from its creditors.

BioUrja trades in oil, natural gas and ethanol and has an extensive logistics and distribution system, according to its website.

In its bankruptcy filing, Dakota Plains listed assets of $3.1 million and debts of $75.4 million.

Its largest creditor is Atlanta-based SunTrust Bank, which is owed $63.2 million. Dakota Plains said it expects to receive $2 million in post-bankruptcy financing from SunTrust, which will enable it to continue engaging in business.

Dakota Plains, which operates a rail terminal in New Town, N.D., went public in March 2012 and its shares quickly hit $12. By October of that year, though, they had fallen below $5 and dwindled to around $2 by early 2015 before falling off the map.

A deadly oil train derailment in Canada, the global decline in oil prices and other factors have consistently hurt the company's bottom line. Dakota Plains posted a net loss of $25 million in 2015 and a net loss of $5.1 million through the first half of this year.

In early September, Dakota Plains announced that its CEO Craig McKenzie had resigned to "voluntarily assist with the company's efforts to reduce expenses." McKenzie's gross pay between Dec. 20, 2015, and Sept. 2 was $487,144, according to bankruptcy documents.

With McKenzie's exit, Dakota Plains gave Gabe Claypool, its president and chief operating officer, the CEO title as well. Claypool's gross pay for the year ending Dec. 20 was $421,368, bankruptcy filings say.

Dakota Plains was co-founded by Gilbertson and Reger, though neither had executive positions at the company. The two men also co-founded Wayzata-based Northern Oil & Gas, a separate company.

Both men were investigated by federal securities regulators in connection with Dakota Plains' initial public offering and various loans made to them in the company's early history.

In November, the Securities and Exchange Commission accused Gilbertson of multiple violations of securities laws — a contention Gilbertson denies. At the same time, the SEC announced that Reger had settled separate claims against him and agreed to pay $8 million, without admitting or denying guilt.