Every year, more than 32 million pregnancies in sub-Saharan Africa are at risk of malaria infection and its adverse consequences. The effectiveness of the intermittent preventive treatment with sulfadoxine-pyrimethamine strategy recommended by WHO is threatened by high levels of parasite resistance. We aimed to assess the efficacy and safety of two alternative strategies: intermittent screening with malaria rapid diagnostic tests and treatment of women who test positive with dihydroartemisinin-piperaquine, and intermittent preventive treatment with dihydroartemisinin-piperaquine. We did this open-label, three-group, randomised controlled superiority trial at four sites in western Kenya with high malaria transmission and sulfadoxine-pyrimethamine resistance. HIV-negative pregnant women between 16 and 32 weeks' gestation were randomly assigned (1:1:1), via computer-generated permuted-block randomisation (block sizes of three, six, and nine), to receive intermittent screening and treatment with dihydroartemisinin-piperaquine, intermittent preventive treatment with dihydroartemisinin-piperaquine, or intermittent preventive treatment with sulfadoxine-pyrimethamine. Study participants, study clinic nurses, and the study coordinator were aware of treatment allocation, but allocation was concealed from study investigators, delivery unit nurses, and laboratory staff. The primary outcome was malaria infection at delivery, defined as a composite of peripheral or placental parasitaemia detected by placental histology, microscopy, or rapid diagnostic test. The primary analysis was by modified intention to treat. This study is registered with ClinicalTrials.gov, number NCT01669941. Between Aug 21, 2012, and June 19, 2014, we randomly assigned 1546 women to receive intermittent screening and treatment with dihydroartemisinin-piperaquine (n=515), intermittent preventive treatment with dihydroartemisinin-piperaquine (n=516), or intermittent preventive treatment with sulfadoxine-pyrimethamine (n=515); 1368 (88%) women comprised the intention-to-treat population for the primary endpoint. Prevalence of malaria infection at delivery was lower in the intermittent preventive treatment with dihydroartemisinin-piperaquine group than in the intermittent preventive treatment with sulfadoxine-pyrimethamine group (15 [3%] of 457 women vs 47 [10%] of 459 women; relative risk 0·32, 95% CI 0·18-0·56; p<0·0001), but not in the intermittent screening and treatment with dihydroartemisinin-piperaquine group (57 [13%] of 452 women; 1·23, 0·86-1·77; p=0·26). Compared with intermittent preventive treatment with sulfadoxine-pyrimethamine, intermittent preventive treatment with dihydroartemisinin-piperaquine was associated with a lower incidence of malaria infection during pregnancy (192·0 vs 54·4 events per 100 person-years; incidence rate ratio [IRR] 0·28, 95% CI 0·22-0·36; p<0·0001) and clinical malaria during pregnancy (37·9 vs 6·1 events; 0·16, 0·08-0·33; p<0·0001), whereas intermittent screening and treatment with dihydroartemisinin-piperaquine was associated with a higher incidence of malaria infection (232·0 events; 1·21, 1·03-1·41; p=0·0177) and clinical malaria (53·4 events; 1·41, 1·00-1·98; p=0·0475). We recorded 303 maternal and infant serious adverse events, which were least frequent in the intermittent preventive treatment with dihydroartemisinin-piperaquine group. At current levels of rapid diagnostic test sensitivity, intermittent screening and treatment is not a suitable alternative to intermittent preventive treatment with sulfadoxine-pyrimethamine in the context of high sulfadoxine-pyrimethamine resistance and malaria transmission. However, dihydroartemisinin-piperaquine is a promising alternative drug to replace sulfadoxine-pyrimethamine for intermittent preventive treatment. Future studies should investigate the efficacy, safety, operational feasibility, and cost-effectiveness of intermittent preventive treatment with dihydroartemisinin-piperaquine. The Malaria in Pregnancy Consortium, which is funded through a grant from the Bill & Melinda Gates Foundation to the Liverpool School of Tropical Medicine.