A double-blind, placebo-controlled study was made of the influence of the anti-inflammatory agent ibuprofen on heterotopic ossification after total hip replacement for arthrosis, fracture or rheumatoid arthritis. Seven drop-outs left 21 patients on medication and 22 on placebo in two comparable groups. Heterotopic ossification appeared in one third of the patients in the ibuprofen group and in three fourths in the control group 12 months after surgery. Five patients in the latter group developed true heterotopic bone, compared to one of the patients on medication. Heterotopic ossification was as common among osteoarthritic patients as among others. There was no difference in the range of motion at 12 months postoperatively between patients with and without heterotopic ossification. In the 22 patients with heterotopic ossification this was demonstrated in all but eight within 6 weeks, and in only three did it appear later than 3 months postoperatively. Five of the six patients who showed heterotopic bone with trabecular structure were male. Since inflammation is a dominant feature in the postoperative phase, the effect of ibuprofen on heterotopic ossification is probably its inhibition of the synthesis of prostaglandins. This implies that prevention is most successful if commenced before or at the time of operation.