Tranexamic acid, given within 3 h of birth, reduces bleeding deaths in women with postpartum haemorrhage. We examined whether giving tranexamic acid shortly after birth can prevent postpartum haemorrhage in women with moderate or severe anaemia. This international, randomised, double-blind, placebo-controlled trial was done in 34 hospitals across four countries (Nigeria, Pakistan, Tanzania, and Zambia). We recruited women of any age in active labour with moderate or severe anaemia (haemoglobin <100 g/L). We randomly assigned women (1:1) who had given birth vaginally to receive 1 g of tranexamic acid or matching placebo by slow intravenous injection (over 10 min) within 15 min of the umbilical cord being cut or clamped. Women were randomly assigned by selection of the lowest numbered treatment pack from a box containing 20 packs that were identical apart from the pack number. Participants, care givers, and those assessing outcomes were masked to group assignment. The primary outcome was a clinical diagnosis of primary postpartum haemorrhage, which might be an estimated blood loss of more than 500 mL or any blood loss sufficient to compromise haemodynamic stability within 24 h of randomisation, analysed on an intention-to-treat basis. Safety analyses were performed in all participants included in the intention-to-treat population. This trial was registered on ISRCTN (ISRCTN62396133), ClinicalTrials.gov (NCT03475342), and the Pan African Clinical Trial Registry (PACTR201909735842379) and is closed to recruitment. From Aug 24, 2019, to Sept 19, 2023, 16 586 women aged 14-50 years were invited to take part and 1518 were excluded. 7580 women were randomly assigned to receive tranexamic acid and 7488 to receive placebo. Primary outcome data were unavailable for one woman in each group. The median time interval from the start of the administration of the trial treatment to the diagnosis of postpartum haemorrhage was 18·5 min (IQR 5-58); 20 min (8-64) in women with moderate anaemia and 13 min (7-44) in women with severe anaemia. 358 (35%) of 1024 with postpartum haemorrhage for whom time data were available were diagnosed before the trial treatment had been fully administered. Clinically diagnosed postpartum haemorrhage occurred in 530 (7·0%) of 7579 in the tranexamic acid group and in 497 (6·6%) of 7487 in the placebo group (risk ratio [RR] 1·05, 95% CI 0·94-1·19). There was no strong evidence against the null hypothesis of homogeneity of effects for any of the prespecified subgroup analyses: severity of anaemia (p=0·44), antepartum haemorrhage (p=0·044), birth canal trauma (p=0·37), use of pain control (p=0·37), and baseline risk of postpartum haemorrhage (p=0·31). There were no vascular occlusive events (pulmonary embolism, deep vein thrombosis, stroke, and myocardial infarction) reported in either group. There were no adverse events related to the treatment and no treatment-related deaths. In women with moderate and severe anaemia, giving tranexamic acid within 15 min of the umbilical cord being clamped did not reduce the risk of clinically diagnosed postpartum haemorrhage. The Bill & Melinda Gates Foundation and the Wellcome Trust.