The prophylactic action of non-steroidal anti-inflammatory drugs (NSAIDs) in heterotopic ossification (HO) was first described following analgesic therapy with indomethacin. Following that evidence, several compounds have been successfully used for prophylaxes of HO. Ibuprofen has been also proposed for the prevention of HO following THA. The present study compared the administration of ibuprofen for three weeks versus indomethacin as prophylaxis for HO following primary THA. In all THA procedures, pre- and post-operative protocols were conducted in a highly standardized fashion. The type of HO prophylaxis (indomethacin 100 mg/daily or ibuprofen 100 mg/daily) was chosen according to a chronological criterion: from 2017 to 2019 indomethacin was used, whereas from 2019 to 2022 ibuprofen was administered. In case of allergy or intolerance to NSAIDs, no prophylaxis was performed, and patients were included as a control group. All patients who underwent an anteroposterior radiography of the pelvis at a minimum of 12 months following THA were considered for inclusion. On admission, the age and sex of the patients were recorded. Moreover, the causes of osteoarthritis and the date of surgery were recorded. The grade of HO was assigned by a blinded assessor who was not involved in the clinical management of the patients. The modified Brooker Staging System was used to rate the efficacy of the interventions. Data from 1248 patients were collected. 62% (767 of 1248 patients) were women. The mean age was 67.0 ± 2.9 years. The mean follow-up was 21.1 ± 10.8 months. In the ibuprofen group, 73% of patients evidenced Brooker 0, 17% Brooker I, and 10% Brooker II. In the indomethacin group, 77% of patients evidenced Brooker 0, 16% Brooker I, 6% Brooker II. No patient in the ibuprofen and indomethacin group developed Brooker III or IV. In the control group, 64% of patients evidenced Brooker 0, 21% Brooker I, 3% Brooker II, and 12% Brooker III. No patient in the control group developed Brooker IV HO. Concluding, three weeks of administration of ibuprofen demonstrated similar efficacy to indomethacin in preventing HO following primary THA. The prophylaxis with ibuprofen or indomethacin was more effective in preventing HO compared to a control group who did not receive any pharmacological prophylaxis.© 2023. The Author(s).