MannKind Corp. on Friday finally secured government approval to sell its Afrezza brand of inhalable insulin, but it came with conditions: it cannot be used for patients with asthma or other lung conditions.

The Valencia biotech, founded by billionaire entrepreneur Alfred Mann, has sought Food and Drug Administration approval for years but the agency has twice asked for additional clinical trials and data, most recently in 2010.

Afrezza will come with a boxed warning that bronchial spasms have occurred in patients with asthma and chronic obstructive pulmonary disease.

“Afrezza should not be used in patients with chronic lung disease such as asthma or COPD because of this risk,” stated the agency in a press release, which added the product also should not be used by smokers.

In its approval, the regulatory agency said Afrezza can treat both Type 1, formerly called juvenile, and Type 2, formerly called adult onset, diabetes. However, it must be used in combination with long-acting insulin in patients with Type 1 diabetes.

The market advantage of Afrezza is that it can be rapidly metabolized by the body since it is quickly absorbed through the lungs into the bloodstream.

Mann founded MannKind in 1991 to develop a fast-acting inhalable insulin and other drugs, including a cancer vaccine. Mann has pumped an estimated $900 million into the venture.

Analysts have estimated sales of Afrezza could total $1 billion to $4 billion annually. MannKind already has started looking for a large drug company to help distribute and market Afrezza in anticipation of FDA approval. The company only develops drugs and does not have a marketing team or sales force.

The FDA announcement came after markets closed Friday.

Earlier in the day, shares closed down 58 cents, or 5.5 percent, to $10. In after-hours trading, shares rose $1.03 to $11.03