In a population of 300,000 individuals, panels show malaria prevalence (PfPR2-10, left), allele frequency of 580Y (middle), and the genotype frequency of piperaquine-resistant parasites (right) over a period of 20 years after a mass drug administration has been carried out. In these scenarios, baseline PfPR2-10 = 5%. Median trajectories are shown from 1000 simulations, and the shaded areas (left panels) show the interquartile range. Simulations are colored by the number of rounds of MDA carried out: blue (0), orange (1), green (2), red (3), purple (4). The top row (panels A, B, C) shows a scenario with no importation of drug-resistant genotypes and no improvement in treatment coverage (ITC) after the MDA is carried out. The second row (D, E, F) shows a scenario where new parasite importation occurs every 10 days; the imported parasite has a 50% probability of carrying the 580Y allele and a 50% probability of carrying piperaquine resistance, independently. The third row (G, H, I) shows a scenario with no importation, but where treatment coverage is increased post-MDA to 80% of the symptomatic patient population. The fourth row (J, K, L) shows a scenario with both importation and ITC. In the middle and right columns, the light gray lines show the absolute number of infected individuals (of any parasitaemia level) in the simulation and correspond to the right-hand gray tick marks on each panel. MDA begins at year zero, and the first-year drop in prevalence can be seen in all plots in the left column. The bottleneck period lasts months to years, depending on the number of rounds of MDA carried out. Selection of 580Y can be seen during the bottleneck period when importation is present (panels E and K), although this bottleneck effect is weaker in a population of 300,000 individuals (this figure) than a population of 40,000 individuals (Fig 2E and 2K). Piperaquine-resistant genotypes are maintained in the population through linkage disequilibrium with 580Y genotypes (panels C, F, I, L, see Fig G in S1 Text). The bottleneck period is risky when importation of 580Y alleles is expected; under these conditions, more rounds of MDA result in worse long-term drug-resistance outcomes (panels E and K).