A key financier of Dakota Plains Holdings claims the Wayzata-based oil services company and two of its top executives defrauded him in connection with a loan arrangement that is now at the center of a federal securities investigation.

Ryan Gilbertson, head of Wayzata-based private equity outfit Northern Capital Partners, sued Dakota Plains late Wednesday in Hennepin County District Court, also naming as defendants Dakota’s recently departed CEO Craig McKenzie and its general counsel, Jim Thornton.

The U.S. Securities and Exchange Commission is investigating possible manipulation of Dakota Plains’ shares when the firm went public in March 2012. Dakota Plains runs an oil loading terminal in North Dakota and is also involved in transporting sand used in fracking.

The company’s shares popped to $12 in the first few weeks of trading. But they faded, and are worth just a penny today — wreckage from the U.S. oil bust.

When Dakota Plains went public, Gilbertson was president of Wayzata-based Northern Oil & Gas, which invests in oil leases in North Dakota. Gilbertson and Michael Reger, the recently ousted CEO of Northern Oil, helped start Dakota Plains. Both participated in a multimillion-dollar loan package to the company. Noteholders received bonuses based on Dakota Plains’ share price during the first 20 days after the stock began trading, the Star Tribune reported in December.

In the lawsuit, Gilbertson said that in exchange for funds he provided Dakota Plains, the company agreed to make payments to him based on its stock price in its initial 20 days of trading, according to the lawsuit. Gilbertson claims, though, that he never enforced provisions requiring the company to make additional cash payments based on share price.

Instead, Gilbertson voluntarily extended the maturity date of his loan to Dakota and twice agreed to restructure it, reducing the amount of payments he would have received by more than $5 million, the suit said. As an “inducement” to the second loan restructuring, Gilbertson claims McKenzie and Thornton told him that an outside law firm had confirmed the loans were “lawful and valid.”

But shortly thereafter, Gilbertson alleges that McKenzie “solicited the SEC to begin an investigation by sending a ‘poison pen’ letter,” the lawsuit said. “McKenzie sent a letter to a governmental agency stating that the loan from [Gilbertson] and other issues violated laws or regulations.”

McKenzie couldn’t be reached for comment. McKenzie, who had been Dakota Plains CEO since February 2013, left that job Monday to “voluntarily assist with the company’s efforts to reduce expenses,” Dakota Plains said in an SEC filing earlier this week. McKenzie remains on the board. Gabe Claypool, the firm’s president, will now also be CEO.

Claypool and Thornton did not return calls from the Star Tribune Thursday.

The SEC’s investigation “arises out of and is connected with” the loan agreement between Gilbertson and Dakota Plains, the lawsuit said. Due to the investigation, Gilbertson says, he has “incurred significant legal bills,” and Dakota Plains has refused to honor an indemnification requirement. By not indemnifying Gilbertson’s legal expenses, the company has breached its contract with him, the suit claims.

Gilbertson has not been accused of any wrongdoing by the SEC. Reger notified his employer, Northern Oil, on Aug. 11 that he had received a “Wells notice” from the SEC saying the agency was pursuing an enforcement action against him for possibly violating securities laws. Reger was fired by Northern Oil a few days later, though he has sued his old employer for wrongful termination.

Dakota Plains has said it is not the target of the SEC investigation.