The U.S. Food and Drug Administration has granted Mannkind Corp. clearance to sell Afrezza, a powder form of insulin created for controlling blood sugar levels in people with diabetes.

Alfred Mann, head of the Valencia, Calif.-based company, has spent almost a decade working on an inhalable form of insulin for diabetics, according to The Los Angeles Times. However, regulators warned that diabetics with asthma or a serious lung disease should not use the powder.

Afrezza, which users take by inhaling, was cleared for Type 1 and Type 2 Diabetes on Friday, and will be used mostly for lowering blood sugar levels at the beginning of a meal. Users can also take the drug 20 minutes after a meal.

An estimated 25.8 million people in the U.S. have diabetes, and this includes people who have and have not been diagnosed, The Wall Street Journal reported.

The effectiveness of Afrezza was examined in a study that included 3,107 patients with either Type 1 or Type 2 diabetes, and was compared to the effectiveness of fast-acting insulin. The drug was taken for 24 weeks, and the researchers observed its ability to control hemoglobin A1C, which is a measure of blood sugar control. Afrezza was not able to reduce hemoglobin levels as much as the fast-acting insulin could, but it was able to reduce the levels enough to achieve the study's pre-specified goal.

Mannkind was previously unable to gain FDA approval for the drug, until the agency's advisory committee voted highly in favor earlier this year to recommend that the agency give its approval, The Wall Street Journal reported.

Mannkind is required by the FDA to conduct post-marketing studies, with one to focus on the possible risk of lung cancer for the drug. While there were more lung cancer cases in clinical studies with patients who took Afrezza, rather than in control groups, the number was still small.

The company had spent eight years seeking approval and close to $1.8 billion working on Afrezza, The Los Angeles Times reported. Mann contributed almost $975 million of his own money in that amount.