PHOENIX - Sunday night, Sen. John McCain underwent surgery for diverticulitis, a statement from his office said Monday.

McCain has had health problems recently, mostly surrounding a cancerous brain tumor diagnosed last July.

It's not clear whether this situation is related to the tumor, whether by side effects or otherwise.

RELATED: McCain undergoes intestinal surgery at Mayo Clinic

What is diverticulitis?

According to WebMD, diverticulitis is when pouches in the wall of the colon form and become inflamed or infected.

Doctors don't know what causes the pouches to grow, but when gut bacteria find their way into the pouches, that can cause the inflammation.

Symptoms

Stomach pain, fever, bloating, diarrhea or constipation and nausea are possible symptoms of diverticulitis. A decrease in appetite can also be an indication of the issue.

Cramping in the stomach and blood in stools are other indications of the ailment.

MCCAIN: What happens if John McCain retires from the Senate?

Treatment

Diverticulitis can be treated differently depending on the severity.

Sometimes doctors will recommend patients stay away from solid foods for a bit to give the colon some time to get back to normal. Antibiotics are also used frequently in treatment.

A heating pad set low on the belly area can help alleviate the pain sometimes.

In McCain's case, he required surgery, an indication of a particularly serious case.

How to avoid diverticulitis

WebMD says some simple preventive measures are to stay hydrated and exercise. Doctors also think a high-fiber diet could decrease your risk of diverticulitis.

You can read more about diverticulitis on WebMD.