There is a system that maintains the balanced state of multicellular organisms. Its main functions are to ensure an adequate physiological response and to defend the body against infectious agents and other unintended invasions. What system has such functions?

Nervous system
Immune system
Homeostatic system
Lymphatic system
Endocrine system