Ryan Gilbertson, a Minnesotan who staked a claim in North Dakota’s oil fields, was sentenced Tuesday to 12 years in federal prison for multiple fraud offenses in a stock-manipulation scheme.

Gilbertson co-founded Wayzata-based Dakota Plains Holdings, which owned a facility in North Dakota that loaded oil onto rail cars. Gilbertson was charged with manipulation of the company’s stock after it went public in 2012, a complex plan that triggered fraudulent bonus payments of more than $30 million to Gilbertson and another company co-founder.

Gilbertson, 42, was convicted in June on 14 counts of wire fraud; six counts of securities fraud; and one count of conspiracy to commit securities fraud. In presentencing filings, Gilbertson, of Delano, asked for 12 to 18 months of home confinement. The federal government called for 25 years in prison.

U.S. District Court Judge Patrick Schiltz ordered 12 years of incarceration, a $2 million fine and $15 million in restitution.

“Mr. Gilbertson has committed an extremely serious crime, brazenly trying to steal $32 million from Dakota Plains” and its shareholders, Schiltz said from the bench in U.S. District Court in Minneapolis. It was an act “of almost pure, unalloyed, unfathomable greed.”

Gilbertson was already a wealthy man, “yet that was not enough for him,” Schiltz said. He orchestrated the stock manipulation “in an attempt to stuff millions of dollars more into [accounts] that were already overflowing.” And he never showed “the slightest remorse,” Schiltz said.

Before the sentencing, Gilbertson told the court he “stood here, humbled, stripped and bared of everything I have worked for in my life.”

Noting he had founded 11 companies, Gilbertson said, “I like creating things and building things and seeing them grow.” Investors won great returns in many of his ventures, he said.

“I realize today it only takes a single one to wipe away a whole lifetime of work,” he said. “The distance of the fall is great.”

Gilbertson, through a spokesman, said he plans to appeal the verdict. Schiltz recommended that Gilbertson serve his sentence at the federal prison camp in Duluth, since it is close to his family, which includes his wife and 9-year-old son.

Gilbertson graduated from Gustavus Adolphus College in 1998 with a degree in international finance, and then made his name as a derivatives trader.

He was a portfolio manager at Piper Jaffray in the Twin Cities for two years until 2006, when he co-founded Northern Oil and Gas with Michael Reger.

Northern, currently based in Minnetonka, is a publicly traded company that invests in projects in North Dakota’s oil fields. While Gilbertson and Reger were serving as Northern’s top executives back in 2008, they also created Dakota Plains.

The pair installed their fathers as figurehead executives to run Dakota Plains, though they secretly controlled the company, the U.S. Securities and Exchange Commission (SEC) said in a civil law enforcement action filed in 2016. The 2017 indictment of Gilbertson made similar claims, but didn’t mention Reger.

Dakota Plains issued notes on generous terms to Gilbertson and Reger, including bonus payments based on the price of the company’s stock during its first 20 days of trading. Note holders would receive bonuses if Dakota Plains’ stock exceeded $2.50 per share; the higher it traded, the larger the bonuses.

The stock popped to around $12 per share in its first few weeks of trading, and then faded, but not before triggering just over $32 million in bonus payments to Gilbertson, Reger and other note holders.

In November 2016, Reger consented to an SEC order, which found he received illicit payments and skirted public-disclosure requirements. The order did not include a finding of stock manipulation. Reger paid nearly $8 million without admitting or denying guilt.

Also in November 2016, the SEC publicly accused Gilbertson of violating multiple federal securities laws in conjunction with Dakota Plains’ IPO. Gilbertson denied those allegations, fighting the SEC civil action. About five months later, he was indicted by a federal grand jury.

Dakota Plains eventually became a casualty of the oil bust that swept through North Dakota after the price of oil began crashing in late 2014. The company filed for bankruptcy in December 2016.

In pre-sentencing filings, Gilbertson’s attorneys noted that the government claimed Dakota Plains suffered an “intended loss” of $32.8 million and an “actual loss” of $11.8 million, due to the scheme. But the filing argued prosecutors failed to prove any loss at all was a result of Gilbertson’s offense.

The government also failed to take into account Gilbertson’s proposals to restructure the bonus payments due to note holders, the filing said. Dakota Plains ended up paying the bonus in stock, not cash. And to the extant the bonus payments had any effect on Dakota Plains’ finances, they didn’t threaten the company’s solvency, the filing said.

From the bench, Schiltz disagreed that the bonus payments weren’t a financial threat to Dakota Plains. And he said Gilbertson agreed to restructure the bonus payments “only under pressure.”

During the sentencing, Schiltz praised Gilbertson for his “work ethic” and “business acumen,” as well as his generosity to charitable causes. Still, he said a 12-year prison term and a large fine were not only warranted, but in line with other securities fraud cases.

“A lengthy sentence will deter others in the business and finance community,” Schiltz said.