A Minnesota college student who was told by Krispy Kreme to stop driving to Iowa every weekend to buy hundreds of its doughnuts to resell in the Twin Cities area⁠ has now struck a sweet deal with the doughnut chain.

Jayson Gonzalez, 21, of Champlin, whose enterprising efforts were recently reported by The St. Paul Pioneer Press, said a typical Saturday starts with a 4-hour trip to a Krispy Kreme store in Clive, Iowa. He would then pack his Ford Focus with up to 100 12-count boxes of doughnuts and deliver them to customers in Minneapolis-St. Paul.

Gonzalez, who is studying accounting at Metropolitan State University, charged $17 to $20 per box and said he used the profits to pay off college debt.

Less than a week after the newspaper reported about his business, which Gonzalez said he started to fill a hole left when the local Krispy Kreme closed down 11 years ago, the confectionery company told him to shut down operations.

"I figured it would come eventually, but it arrived early with the surrounding articles," Gonzalez wrote in an Oct. 31 Facebook post on the "Krispy Kreme Run Minnesota" page, which he uses to inform customers of his doughnut hauls. "Life happens, and it could be a sign that something else is meant to be."

On Monday, however, Gonzalez reached a deal to continue making dough with his side hustle: He said he had received a call from Krispy Kreme and would be working with them to resume his business.

"They want to ensure I become an independent operator and make sure the brand is represented well," Gonzalez wrote in a Facebook post. "On both ends, there are things that are being worked on right now to achieve that as this is being made as a special exception."

Krispy Kreme confirmed the partnership in a statement to NBC News, in which the company praised Gonzalez for his "love of Krispy Kreme" and expressed admiration for his entrepreneurial spirit.

"We are going to help him achieve his goals, which include being debt-free when he graduates in 2021, in part, by selling Krispy Kreme doughnuts," the company said in a statement.

The chain also responded to criticism of its initial decision to halt the resale. "Our intent regarding the temporary stoppage of him selling doughnuts was to ensure product quality and regulatory compliance to protect both Jayson and Krispy Kreme," the company said.

Krispy Kreme said its primary concern is that the doughnuts Gonzalez sells maintain its "high product quality standards, given the distance and manner in which he is transporting and distributing them."

The company said it was happy to work with Gonzalez as an independent operator to ensure consistent delivery to fans in Minnesota.

"We wish Jayson great success and we’re thrilled to help him achieve it by donating 500 dozen doughnuts when he restarts his business," Krispy Kreme said.

Gonzalez is now trying to raise money to buy a new vehicle to keep up with the growing doughnut demand. "I am happy that things turned out positive, and this can continue to strive and grow over the next couple of years," he said on his Facebook post announcing the deal.