We find that mutation or tissue-specific depletion of SMN induces hyperactivation of the immune deficiency (IMD) and Toll pathways, leading to overexpression of antimicrobial peptides (AMPs) and ectopic formation of melanotic masses in the absence of an external challenge. This evidence concerns the gene SMN2 and Immunodeficiency.