Erythema nodosum is a skin condition that causes painful swollen red or purple bumps most commonly on the shins. Sometimes the bumps can also form on other parts of the body.

This condition is the most common form of panniculitis, which is inflammation of the fat layer underneath the skin. It’s often caused by an immune response to an infection or a reaction to drugs you’ve taken.

The main symptom is red, painful bumps on the lower part of your legs. Sometimes these bumps can also appear on your thighs, arms, torso, and face.

The lumps can be one-half inch up to 4 inches. You may have anywhere from two to 50 of them.

Erythema nodosum bumps are painful and they may feel hot. They start out red, and then turn purple, looking like bruises as they heal. They also flatten out while healing.

The bumps can last for two weeks. New bumps can keep forming for up to six weeks.

Other symptoms of erythema nodosum include:

  • fever
  • fatigue
  • joint pain
  • pain in the legs
  • ankle swelling
  • enlarged lymph nodes in the chest
  • cough
  • sore throat
  • weight loss
  • stomach pain
  • diarrhea

In more than half of all cases the cause is unknown. Erythema nodosum often starts after you’ve had an infection or you’ve used certain medicines. Doctors believe it may be caused by an immune system overreaction to bacteria and other substances you’re exposed to.

Causes include:

  • infections such as strep throat or tuberculosis
  • reactions to drugs such as antibiotics (sulfonamides and forms of penicillin), salicylates, iodides, bromides, and birth control pills
  • sarcoidosis, a condition that causes inflammation in many parts of the body
  • coccidioidomycosis, an infection of the lungs and upper respiratory tract
  • inflammatory bowel disease, ulcerative colitis or Crohn’s disease
  • pregnancy
  • cancer (rarely)

Erythema nodosum most often affects people ages 20 to 40. Women are six times more likely to develop it than men. However, it can happen in people of any age and in both sexes.

If a bacterial infection caused this condition, your doctor will prescribe antibiotics to treat it. You can treat erythema nodosum that’s caused by a drug reaction by stopping the medicine.

These medicines can help you manage pain and other symptoms until the lumps heal:

  • nonsteroidal anti-inflammatory drugs (NSAIDs) such as aspirin, ibuprofen (Advil, Motrin), or naproxen (Aleve) (Don’t use these if you have Crohn’s disease because they could trigger a flare.)
  • potassium iodide
  • oral steroids

Also, rest with your legs elevated and wear compression stockings while the bumps heal. And avoid irritating the bumps by wearing itchy or tight clothing.

Your doctor will ask about your health history, and whether you’ve recently had an infection or used certain medicines. Then your doctor will look at the bumps.

You’ll likely get a blood test to look for signs of inflammation in your body. Blood tests can also be used to check for tuberculosis and other infections. You may have a throat culture to look for strep throat.

Other tests to look for the causes of erythema nodosum include:

  • urine test
  • chest X-ray
  • stool culture

Your doctor may remove a sample of tissue from the fat layer under your skin. This test is called a biopsy. A technician at a lab will look at the sample under a microscope to check for changes related to erythema nodosum.

About 5 percent of pregnant women develop erythema nodosum. The cause may be increased estrogen levels during pregnancy.

Erythema nodosum is treated in much the same way during pregnancy as it is in women who aren’t pregnant. However, some of the medicines like NSAIDs used to treat this condition can’t be used during pregnancy. Bed rest and compression stockings can help manage pain and other symptoms.

Your obstetrician can tell you the best way to control erythema nodosum during pregnancy. The bumps should fade within a few weeks.

Erythema nodosum can be uncomfortable, but it’s usually not serious.

The bumps will often fade within two to four weeks, but they can take up to two months to heal completely. You’ll likely have some bruising as the bumps fade, but they usually don’t leave scars.

Pain in your legs can continue for up to two years after erythema nodosum heals. It’s also possible the condition can come back in the future.