Plasmodium species are frequently host-specific, but little is currently known about the molecular factors restricting host switching. This is particularly relevant for P. falciparum, the only known human-infective species of the Laverania sub-genus, all other members of which infect African apes. Here we show that all tested P. falciparum isolates contain an inactivating mutation in an erythrocyte invasion associated gene, PfEBA165, the homologues of which are intact in all ape-infective Laverania species. Recombinant EBA165 proteins only bind ape, not human, erythrocytes, and this specificity is due to differences in erythrocyte surface sialic acids. Correction of PfEBA165 inactivating mutations by genome editing yields viable parasites, but is associated with down regulation of both PfEBA165 and an adjacent invasion ligand, which suggests that PfEBA165 expression is incompatible with parasite growth in human erythrocytes. Pseudogenization of PfEBA165 may represent a key step in the emergence and evolution of P. falciparum.