Federal authorities have been investigating a price spike in the stock in a Minnesota-based oil train loading company after it went public in 2012, resulting in an windfall for investors who held promissory notes with an unusual payout feature.

The investigation by the U.S. Securities and Exchange Commission (SEC) is focused on a $9 million loan by several individuals to Dakota Plains Holdings of Wayzata. Under the terms of the promissory notes, the note holders received bonus payments based on Dakota Plains’ share price during the first 20 days after its stock began publicly trading in March 2012.

In a filing in U.S. District Court in Minnesota, the SEC said that after Dakota Plains went public through a reverse merger, its stock “rose to $12 per share on very light volume and stayed at or near $12 per share for almost exactly 20 days,” entitling the note holders to $32.9 million. After the run-up in price, shares steadily fell and never rose anywhere near the $12 level.

Securities regulators have been looking into the matter since October 2014, but the investigation was disclosed only recently when government attorneys sought a court order to compel one investor to answer questions about her stock and promissory note transactions.

The investor, Jessica Medlin, is the former spouse of Ryan Gilbertson, CEO of Northern Capital Partners, a private equity firm based in Wayzata. According to the SEC, both of them engaged in 2012 Dakota Plains transactions. They had divorced the previous year.

At the time, Gilbertson also was president of Northern Oil and Gas Inc., which invests in North Dakota oil leases. Gilbertson left Northern Oil and Gas, also based in Wayzata, in October 2012, a few months after the events under SEC investigation.

Neither Medlin nor Gilbertson have been accused of wrongdoing by the SEC. The agency’s Dec. 10 filing in federal court seeks an order to compel Medlin to answer questions and to hand over documents related to Dakota Plains transactions. She didn’t show up for a November interview after months of requests by the SEC, the filing says.

Medlin said she turned over documents months ago to her former attorney, was surprised by the SEC filing and intends to cooperate. She also said she expects the case will be dismissed, but declined to answer questions when contacted by the Star Tribune.

An SEC affidavit said Medlin was involved in a number of transactions in Dakota Plains stock or promissory notes that may have been made by or at the direction of her former husband, Ryan Gilbertson. “Although Ryan Gilbertson had no publicly disclosed role with Dakota Plains, he had substantial involvement with the company,” and a foundation partly controlled by him held approximately $3.5 million of the promissory notes, according to the affidavit by Chicago-based SEC accountant Craig McShane.

Gilbertson declined to answer questions from the Star Tribune, but said that no agency has brought an action against him, that he supplied information to regulators about this matter when requested, that he has always cooperated with regulators and will continue to do so.

Gilbertson’s father, Weldon Gilbertson, also has been questioned by SEC officials about 2.1 million shares of Dakota Plains stock, some of which were transferred to Ryan Gilbertson, the affidavit said. “Weldon Gilbertson testified before the SEC that he did not know he owned those 2.1 million shares and knew nothing about the transfers to his son,” the affidavit said. Weldon Gilbertson had no comment.

Dakota Plains said through a spokesman that it had no comment. The SEC filing does not suggest wrongdoing by company officials.

Indeed, Dakota Plains twice renegotiated terms of the $9 million loan to reduce the share-spike payout. After those revisions, note holders still got large cash payments, plus 12 percent interest, along with shares of Dakota Plains stock. The share price has dropped significantly, however, reducing the overall windfall. The company’s stock on Wednesday traded at 25 cents per share.

The other note holders who gained from the transaction aren’t named, and the SEC declined to comment. The reason Dakota Plains originally agreed to the unusual loan, which it has described as having an “embedded derivative,” also is not clear.

Dakota Plains began operations in 2010 by developing a crude oil train loading terminal in New Town, N.D., to capitalize on the oil boom and the limited pipeline infrastructure. The company later expanded into unloading trains that haul sand from out of state to develop new Bakken oil wells, a process called hydraulic fracturing.

After being threatened with delisting from the small-cap exchange of the New York Stock Exchange, Dakota Plains recently proposed a plan to address its stockholders deficit and annual losses.