The term cell-mediated immunity refers to immunity mediated primarily by T lymphocytes.