Drug maker InterMune Inc. has agreed to pay $37 million to settle charges it promoted a drug to treat a fatal lung disease even though it was approved for a different ailment and its own studies didn’t show it was effective.

The drug Actimmune is approved by the Food and Drug Administration to treat an immune system disorder and a bone disease but was often prescribed off-label to treat a lung-scarring condition known as idiopathic pulmonary fibrosis.