T cell memory allows for the rapid generation of effective immune responses to previously encountered pathogens. Although most memory T cells recirculate through the body, a recently discovered subset, the tissue resident memory T cells (TRM), remains in the affected tissue after infection is cleared. By staying in the organ most likely targeted by the pathogen in subsequent reinfections, TRM have the potential to elicit faster, more focused responses than circulating memory T cell subsets. We found that following vaccination with radiation-attenuated Plasmodium berghei ANKA sporozoites (RAS), a population of TRM cells formed in the liver. These cells constantly surveyed the hepatic sinusoids and were essential for protection, as their depletion rendered vaccinated mice fully susceptible to sporozoite infection. By combining dendritic cell priming and antigen recognition on hepatocytes we generated a novel vaccination strategy, called prime-and-trap, that induced the formation of vast numbers of liver TRM and achieved unprecedented levels of sterile protection against live sporozoite challenge. Vaccination aimed at the induction of liver TRM cells may be a more effective way to control liver-stage malaria than traditional strategies generating circulating memory T cells.