evidence: Patients were eligible if they were moderately ill and admitted to hospital wards for covid-19 with laboratory confirmed SARS-CoV-2 infection and had increased D-dimer levels within the first five days of admission. Moderate illness was defined as admission to hospital ward level of care (ie, not to ICU), not already mechanically ventilated, and not imminently requiring mechanical ventilation or critical care. D-dimer levels were required to be above the upper limit of normal of the local hospital in the presence of an oxygen saturation ≤93% on room air, or ≥2 times the upper limit of normal irrespective of oxygen saturation. Participants were excluded if they had substantial bleeding risks, an absolute indication for or any contraindication to heparin anticoagulation based on care team judgment, were pregnant, or if they had already experienced, or would imminently experience any component of the primary outcome (all cause death, non-invasive or invasive mechanical ventilation, or ICU admission). Full eligibility criteria are provided in the supplementary file. Written informed consent was obtained from all participants or their legal representatives. [...] In this randomised trial of moderately ill patients with covid-19 and increased D-dimer levels admitted to hospital wards, therapeutic heparin was not associated with a significantly lower incidence of the primary composite of death, mechanical ventilation, or ICU admission compared with prophylactic heparin. The odds of all cause death in the group allocated to therapeutic heparin was, however, significantly reduced by 78%. Between group differences were smaller and non-significant for mechanical ventilation and ICU admission.