Thanks to one-time payments, MannKind Corp. beat Wall Street estimates on earnings and revenue for the third quarter.

The Valencia biotech firm on Wednesday reported net income of $127 million (26 cents a share) for the quarter ending Sept. 30, compared to a net loss of $31.9 million (-8 cents) in the same period a year earlier. Revenue was $162 million.

Analysts on average expected a loss equal to 6 cents a share on revenue of $2 million, according to Thomson Financial Network.

MannKind received deferred payments of $200 million from Sanofi S.A., its former partner in distributing Afrezza, an inhalable insulin developed by MannKind. The payments were offset by a net $64.8 million loss from its share of the partnership that was terminated earlier this year.

Shares on Wednesday closed up nearly 4 cents, or more than 8 percent, to 47 cents on the Nasdaq.