Pain in your flank may be due to a muscle spasm or pinched nerve. But it can also be a sign of a more serious condition, like a kidney infection or a fracture. Treatment depends on the cause.

Flank pain refers to discomfort in your upper abdomen or back and sides. It develops in the area below the ribs and above the pelvis. Usually, the pain is worse on one side of your body.

Most people experience flank pain at least once in their life. It’s usually temporary.

Constant or severe flank pain may indicate a serious medical condition, such as a urinary tract infection. Kidney stones or other kidney problems, especially pyelonephritis, may also cause persistent flank pain.

It’s important to talk with a doctor if you have chronic or severe flank pain, especially if you’re also experiencing other symptoms.

Some of the more common causes of flank pain include:

Less common causes of flank pain include:

Flank pain may be achy and dull or cramp-like and sharp. It may come and go in waves.

Symptoms of a kidney problem

The pain is likely from a kidney problem if you also have the following symptoms:

Get medical care right away if you’re experiencing any of the above symptoms with prolonged flank pain.

Symptoms of dehydration

Also seek immediate medical care if you’re experiencing persistent pain with these symptoms of dehydration:

It’s important to treat dehydration right away. When you lose too much water from your body, your organs, cells, and tissues fail to function as they should. This can lead to dangerous complications, including shock.

During your appointment, your doctor will try to identify the underlying cause of your flank pain. Be prepared to answer questions about:

  • the location of the pain
  • when the pain began
  • what the pain feels like
  • how often you experience the pain
  • how long you experience the pain
  • what other symptoms you have

Your doctor may also order blood tests and imaging tests to determine the cause of your flank pain.

Imaging tests, such as ultrasounds, X-rays, or CT scans, allow your doctor to look deep within your body. These tests can reveal problems in the organs, tissues, bones, and muscles.

Before performing a CT scan or other imaging test, your doctor may inject a contrast dye into one of your veins. They do this to improve the quality of the images. This makes it easier to identify any obstructions in your blood vessels or organs. The dye is usually iodine, and it rarely causes side effects.

Other diagnostic tests your doctor may recommend include:

  • abdominal CT scan, which is a type of specialized X-ray that can show cross-sectional images of the abdomen
  • cystoscopy, which is a minor procedure that involves inserting a thin tube with an attached camera into the bladder
  • urinalysis, which is a simple urine test
  • urine culture to detect any bacteria in the urine

Minor flank pain typically resolves with a combination of rest and physical therapy. Your doctor may also recommend specific exercises you can do for quick relief from muscle spasms.

Treatment for flank pain from inflammation

For flank pain from inflammation, such as an infection and arthritis, the treatment will depend on the specific condition.

Kidney infections may require hospitalization. A doctor will prescribe antibiotics if you have a kidney infection. They may give these antibiotics to you intravenously (through a vein).

Physical therapy and exercise programs can often treat pain from arthritis in the spine. Your doctor may also prescribe an anti-inflammatory medication, which will help reduce inflammation and discomfort.

In rare cases, surgery may be needed to correct a spinal problem that’s causing flank pain.

Treatment for kidney stones

Most treatment plans for kidney stones involve pain medications and lots of fluids to encourage the passing of the stone. In most cases, kidney stones don’t need surgery.

However, a doctor may perform a minor procedure called lithotripsy if larger kidney stones can’t easily exit your body during urination. Lithotripsy involves the use of high frequency sound waves to break up the kidney stones so they can pass through the ureters.

The ureters are the tubes that carry urine from the kidney to the bladder. A doctor may also use other surgical techniques to remove the stones.

Depending on your level of pain, a doctor may recommend over-the-counter or prescription pain-relief medications. More severe cases may require a hospital stay.

Talk with your doctor if you continue to experience intense or prolonged flank pain even after treatment.

You may be able to reduce the risk of certain occurrences of flank pain by following general health best practices:

  • Stay adequately hydrated.
  • Limit how much alcohol you drink, if applicable.
  • Eat a balanced diet that includes lots of vegetables, fruits, and lean proteins.
  • Exercise at least three times per week.