Immune defense against hepatotropic viruses such as hepatitis B (HBV) and hepatitis C (HCV) poses a major challenge for therapeutic approaches. Intrahepatic cytotoxic CD8 Tcells that are crucial for an immune response against these viruses often become exhausted resulting in chronic infection. We elucidated the Tcell response upon therapeutic vaccination in inducible transgenic mouse models in which variable percentagesof antigen-expressing hepatocytes can be adjusted, providing mosaic antigen distribution and reflecting the varyingviral antigen loads observed in patients. Vaccination-induced endogenous CD8 Tcells could eliminate low antigen loads in liver but were functionally impaired if confronted with elevated antigen loads. Strikingly, only by conditioning the liver environment with TLR9 ligand prior and early after peripheral vaccination, successful immunization against high intrahepatic antigen density with its elimination was achieved. Moreover, TLR9 immunomodulation was also indispensable for functional memory recall after high frequency antigen challenge.Together, the results indicate that TLR9-mediated conditioning of liver environment during therapeutic vaccination or antigen reoccurrence is crucial for an efficacious intrahepatic Tcell response.