The immune system has three lines of defense to protect the body from pathogens. The first line includes physical and chemical barriers like the skin and mucous membranes. The second line contains nonspecific immune cells that attack any foreign invaders, such as phagocytes and natural killer cells. These first two lines provide immediate but generalized protection. The third line of defense contains adaptive defenses like B and T cells that develop slowly but provide targeted protection against specific pathogens they have encountered before. Together these layered defenses work to fight off disease.