A substance that induces the formation of antibodies because it is recognized by the immune system as a threat. It may be a foreign (nonnative) substance from the environment (such as chemicals) or formed within the body (such as bacterial or viral toxins ).