Effective prophylaxis against acute respiratory failure (ARDS) has not been established. This study investigated whether or not ketoconazole could prevent ARDS in critically ill surgical patients. Seventy-one Surgical Intensive Care Unit (SICU) patients without liver dysfunction received either ketoconazole (n = 35), 200 mg daily via the gastrointestinal tract, or placebo (n = 36), for 21 days or until discharge from the SICU, in a prospective, randomized, double-blind study. Patients were monitored clinically for signs of ARDS, defined as all the following: intrapulmonary shunt greater than 15%, a PaO2/FIO2 ratio less than 150, normal central venous, pulmonary capillary wedge, or left atrial pressure, no other cause of hypoxemia, and a consistent chest X-ray. Thirteen patients (18%) developed ARDS with significantly increased mortality versus non-ARDS patients (69% vs. 29%). The incidence of ARDS was decreased among ketoconazole patients compared to placebo (6% vs. 31%; p less than 0.01), as was median SICU stay (7.0 days vs. 15.5 days; p less than 0.05), and median SICU cost (+5,600. vs. +12,400.; p less than 0.05). Mortality is increased with ARDS after trauma and surgery. We conclude that ketoconazole prevents ARDS, shortens SICU stay, and lowers hospital costs.