Peeing while suffering a urinary tract infection is an ordeal — the urine must come out, but your body makes sure you feel the sting of every last drop. But painful pee may not necessarily be a UTI.

Discomfort or burning while urinating could also be a symptom of numerous other medical conditions, the Mayo Clinic notes, including the sexually transmitted disease chlamydia, kidney stones, an inflamed prostate or a yeast infection. It could even be a reaction to a particular soap or a tampon that was never removed. Symptoms may even be further delineated by the location of the infection.

The urinary tract removes waste and extra water from the body and includes the kidney, narrow tubes called ureters, the bladder and then the final tube, the urethra, according to the National Institute of Diabetes and Digestive and Kidney Diseases. When the infection is in the kidneys, the Mayo Clinic says, there could be back and side pain, fever, chills, nausea and vomiting. With the bladder, those symptoms are pelvic pressure, blood in the urine, abdominal discomfort, and frequent painful urination. Down in the urethra, the opening at the end of the penis or in front of the vagina, an infection causes discharge and burning. More general warning signs are cloudy or odorous urine. If any or all of these symptoms fit you, there’s a good chance the problem is a UTI.

Why is this happening? Bacteria. “Normal urine has no bacteria in it, and the one-way flow helps prevent infections,” the Urology Care Foundation notes. “Still, bacteria may get into the urine from the urethra and travel up into the bladder.” That could be from something as basic as wiping after a bowel movement from back to front instead of front to back or having sex that jostles bacteria about. The National Institute of Diabetes and Digestive and Kidney Diseases says in the large majority of UTIs, which are the second most common type of infection and affect women more often than men, E. coli is the culprit, as it can live in the bowel. “Certain bacteria have a strong ability to attach themselves to the lining of the urinary tract,” explains the group, part of the National Institutes of Health.

Fortunately, the simplest UTIs are treatable with antibiotics. More complicated ones, like kidney infections, could take several weeks of the medication but if left untreated, could cause kidney damage or a urinary tract obstruction. The federal institution also says patients can speed their recovery by “drinking lots of fluids and urinating frequently. … A heating pad on the back or abdomen may also help” relieve pain. Before it gets to that point, there are ways to limit bacteria growth and thus help prevent a UTI, including staying hydrated, urinating often, urinating shortly after sex to flush out the system, and wearing loose-fitting or breathable clothing.