The CC chemokine receptor 7 (CCR7) and its two ligands, CCL21 and CCL19, play an important role in migration of immune cells to lymphoid tissue. To analyze the function of CCR7 in T cell immunity to infectious agents in vivo, transgenic (tg) mice expressing CCL21 in an ubiquitous fashion were generated. These mice contained high amounts of CCL21 in the serum ( approximately 0.3 microg/ml that resulted in CCR7 down-regulation and in a strongly impaired migration of T cells toward CCL21 in vitro. Lymph nodes in CCL21-tg mice were reduced in size but with intact microanatomy and normal distribution of T and B cells. CCL21-tg mice showed a significantly decreased CD8 T cell response to lymphocytic choriomeningitis virus after footpad infection, whereas the response after systemic infection was not altered. Likewise, the CD4 T cell response to footpad infection with Leishmania major was considerably lowered and CCL21-tg mice failed to clear parasites from infected skin. Taken together, these data demonstrate the importance of CCR7 in mediating T cell immunity to viral and parasitic pathogens after local infection.