Primary vs Secondary Immunodeficiency: Key Differences
At a Glance
Primary immunodeficiency is caused by a genetic immune-system defect present from birth, while secondary immunodeficiency develops later because of medications, illness, infection, protein loss, or malnutrition. Doctors use medical history and blood tests to distinguish them.
In this answer
4 sections
If you have been told you have a weak immune system, it is natural to wonder why. The main difference between the two types of immunodeficiency is their root cause: primary immunodeficiency involves an intrinsic genetic defect you have had since birth, while secondary immunodeficiency is an immune problem that develops later because of an outside factor like a medication, another illness, or malnutrition [1].
Understanding the difference is important because it guides how your medical team will manage your care—whether that means adjusting a medication, treating an underlying disease, or focusing on replacing missing immune components. It is also important to know that primary and secondary conditions can overlap; a person can have an underlying genetic susceptibility and also develop a secondary impairment [2].
Important Safety Note: If you are known or suspected to be immunocompromised, follow your clinician’s instructions about seeking prompt medical care for fevers or worsening illnesses. Never stop or change any prescribed medications, especially immune-suppressing drugs, without talking to your doctor first.
Primary Immunodeficiency (Inborn Errors of Immunity)
Primary immunodeficiencies—increasingly referred to by doctors as inborn errors of immunity (IEI)—are built-in defects in your immune system. They are caused by genetic changes that prevent your body’s defenses from developing or functioning correctly [3].
- Genetic origins: Hundreds of different genes and conditions have been identified that cause these primary immune defects [1]. While the genetic predisposition is present from birth, the genetic change may be inherited from your parents or it may be a new (de novo) mutation that started with you [1][4].
- When they appear: While many people show warning signs during childhood—such as poor growth (sometimes called “failure to thrive”) or unusually severe infections—symptoms can begin at any age, and many primary immunodeficiencies are not identified until adulthood [5][6].
- Signs and symptoms: People with primary immunodeficiencies often experience recurrent, severe infections that may require intravenous (IV) antibiotics or unusually long courses of treatment [6].
- Immune dysregulation: Beyond infections, these conditions can cause immune dysregulation—meaning the immune system mistakenly attacks the body or overreacts. This can result in severe eczema, very high levels of IgE (an antibody associated with allergic responses), or autoimmune diseases where the body attacks its own tissues [7][8].
- Family history: Having blood relatives with severe infections or immune issues is one clue that an immunodeficiency might be primary [6][4]. However, the absence of a family history does not rule out a genetic condition.
Secondary Immunodeficiency (Acquired)
Secondary immunodeficiency occurs when an external factor weakens your immune system. This is much more common than primary immunodeficiency. Depending on the cause and how long it has been present, secondary immune impairment may be temporary, persistent, or only partially reversible [2].
Common causes of secondary immunodeficiency include:
- Medications: Drugs that suppress the immune system, such as chemotherapy for cancer, corticosteroids, or biologic medicines (drugs made from living organisms) used for autoimmune diseases [9].
- Other medical conditions: Blood cancers (like lymphoma or leukemia), uncontrolled diabetes, and certain chronic organ diseases can weaken immune function [2].
- Protein loss: Conditions like severe kidney disease or protein-losing gastrointestinal disorders can cause the body to lose vital immune proteins (immunoglobulins) faster than it can replace them [9].
- Infections and malnutrition: Untreated or advanced viral infections (such as HIV) or extreme malnutrition can reduce immune proteins or weaken immune-cell function [9].
Comparing Primary and Secondary Immunodeficiency
| Feature | Primary Immunodeficiency (IEI) | Secondary Immunodeficiency |
|---|---|---|
| Root Cause | Intrinsic genetic defect [3] | External factors (meds, illness, environment) [2] |
| When It Starts | Genetic predisposition present at birth; symptoms can start at any age [5] | Acquired later in life [2] |
| Is it Inherited? | Can be inherited or a new genetic mutation [4] | No, though you can inherit diseases that cause it |
| Reversibility | Generally lifelong; treatment focuses on management and replacement [3] | May improve or resolve if the underlying cause is successfully treated [2] |
| Overlap | - | Can coexist with an underlying primary condition [2] |
How Your Doctor Tells the Difference
Because frequent or severe infections can happen in both primary and secondary conditions, doctors must act like detectives to find the root cause. A clinical evaluation is highly individualized, and primary and secondary causes are often investigated in parallel [9].
Your care team will review your complete medical history, looking closely at your current and past medications, history of infections (types of organisms, severity, frequency), and family history [9]. They will also run a variety of blood tests. These tests may include a complete blood count (CBC), tests to see how well you responded to past vaccines, and measurements of your immunoglobulin (antibody) levels [9]. They may also use flow cytometry—a laboratory technique used to count and examine different types of white blood cells—which is helpful for evaluating both primary and secondary conditions [10].
If a primary condition is suspected, or if secondary causes do not fully explain your symptoms, your doctor may recommend genetic testing to look for a precise genetic cause (molecular diagnosis) [9][11]. Keep in mind that genetic testing can sometimes be inconclusive, and a negative genetic test does not entirely rule out an inborn error of immunity [11].
Common questions in this guide
What is the main difference between primary and secondary immunodeficiency?
Can a primary immunodeficiency first be diagnosed in adulthood?
What can cause secondary immunodeficiency?
Which tests help doctors identify the type of immunodeficiency?
Is it possible to have both primary and secondary immunodeficiency?
Does secondary immunodeficiency go away?
Appointments are short. Make every minute count.
Specialist visits move fast. Let us help you prep so your time goes to what matters.
Types of immunodeficiency
Is my weak immune system from a genetic cause or from something that developed later?
About testing
Would genetic testing help find a precise cause, and what would a negative result mean?
Blood tests
Would blood tests of my immunoglobulin levels or vaccine response be part of the evaluation?
Related questions
Show more
Get notified when new evidence is published on Primary immunodeficiency.
We monitor PubMed for new peer-reviewed studies on this topic and email a short summary when something meaningful changes.
References
References (11)
- 1
Inborn Errors of Immunity.
Baloh CH, Chong H
The Medical clinics of North America 2024; (108(4)):703-718 doi:10.1016/j.mcna.2023.08.006.
PMID: 38816112 - 2
Secondary Immune Deficiency and Primary Immune Deficiency Crossovers: Hematological Malignancies and Autoimmune Diseases.
Ballow M, Sánchez-Ramón S, Walter JE
Frontiers in immunology 2022; (13()):928062 doi:10.3389/fimmu.2022.928062.
PMID: 35924244 - 3
Precision Medicine in the Treatment of Primary Immune Deficiency Patients With Disorders of Immune Dysregulation.
Ballow M, Leiding JW
Clinical reviews in allergy & immunology 2022; (63(1)):1-8 doi:10.1007/s12016-021-08871-4.
PMID: 34169440 - 4
A novel IKZF1 variant in a family with autosomal dominant CVID: A case for expanding exon coverage in inborn errors of immunity.
Stojkic I, Prince BT, Kuehn HS, et al.
Clinical immunology (Orlando, Fla.) 2024; (264()):110244 doi:10.1016/j.clim.2024.110244.
PMID: 38734037 - 5
When to consider an inborn error of immunity: clues for physicians.
Thangarajah M, Berglund LJ
Internal medicine journal 2026; (56(9)):1488-1499 doi:10.1111/imj.70505.
PMID: 42322632 - 6
Failure of immunological competence: when to suspect?
Pinto-Mariz F
Jornal de pediatria 2021; (97 Suppl 1()):S34-S38 doi:10.1016/j.jped.2020.10.007.
PMID: 33176165 - 7
Pathophysiology of Congenital High Production of IgE and Its Consequences: A Narrative Review Uncovering a Neglected Setting of Disorders.
Galletta F, Gambadauro A, Foti Randazzese S, et al.
Life (Basel, Switzerland) 2024; (14(10)) doi:10.3390/life14101329.
PMID: 39459629 - 8
The plethora, clinical manifestations and treatment options of autoimmunity in patients with primary immunodeficiency.
Barış HE, Kıykım A, Nain E, et al.
Turk pediatri arsivi 2016; (51(4)):186-192 doi:10.5152/TurkPediatriArs.2016.3928.
PMID: 28123330 - 9
Diagnostic tests for primary immunodeficiency disorders: Classic and genetic testing.
Klangkalya N, Fleisher TA, Rosenzweig SD
Allergy and asthma proceedings 2024; (45(5)):355-363 doi:10.2500/aap.2024.45.240051.
PMID: 39294902 - 10
Flow Cytometry as a Diagnostic Tool in Primary and Secondary Immune Deficiencies.
Farmer JR, DeLelys M
Clinics in laboratory medicine 2019; (39(4)):591-607 doi:10.1016/j.cll.2019.07.007.
PMID: 31668272 - 11
Mycophenolate mofetil for autoimmune cytopenias in children: high rates of response in inborn errors of immunity.
Berrueco R, González-Forster E, Deya-Martinez A, et al.
Frontiers in pediatrics 2023; (11()):1174671 doi:10.3389/fped.2023.1174671.
PMID: 37915985
This comparison is for informational purposes and does not constitute medical advice. A clinical immunologist or other clinician should interpret your infections, test results, and possible medication-related causes.