Valencia biotech MannKind Corp. on Wednesday announced that the company has entered into a new contract with Sanofi, its former partner for selling inhalable insulin Afrezza.

The French pharma giant terminated its licensing agreement with MannKind earlier this year, and as a result, MannKind regained worldwide manufacturing and marketing rights to Afrezza, its sole commercial product.

The new deal forgives MannKind of a loan balance of $71.6 million and also relieves the company from its obligation to pay $500,000 in uncharged costs from the previous agreement. In addition, Sanofi will purchase $10.2 million in insulin from MannKind next month.

MannKind shares closed up 15 cents or 33 percent to 62 cents on the Nasdaq.