Articles & Guides › Articles › Renal, Urinary & Electrolytes
Urinary tract infection and kidney stones
Which organisms cause urinary tract infection and how their virulence factors and laboratory features identify them, how pyelonephritis differs from cystitis, and how calcium, struvite, uric acid and cystine stones form and are prevented.
Renal, Urinary & Electrolytes · 6 min read · Reviewed 2026-11-09
Urinary tract infections and kidney stones are two of the most common reasons people see a doctor about their urine, and they are linked: some bacteria make stones, and stones trap bacteria. Most infections ascend from the bowel through the urethra, and most stones form when urine becomes supersaturated with a salt[1]. This article covers the organisms and how they attach, pyelonephritis, calcium stones and the other stone types.
Key points
- E. coli causes most urinary infections; Staphylococcus saprophyticus is the second most common cause of cystitis in young women and is novobiocin-resistant.
- Nitrite detects gram-negative Enterobacterales; a negative nitrite does not rule out infection with gram-positive organisms.
- P fimbriae let E. coli climb to the kidney; white cell casts locate infection in the kidney rather than the bladder.
- Calcium oxalate stones are the most common; fat malabsorption causes enteric hyperoxaluria. Do not restrict dietary calcium; thiazides and citrate prevent recurrence.
- Struvite stones come from urease-producing bacteria such as Proteus in alkaline urine and form staghorns; uric acid stones are radiolucent and dissolve with alkali; cystine stones are hexagonal.
Urinary tract infection: organisms and virulence factors
Who gets them
A short urethra close to the vagina and rectum lets bowel bacteria reach the bladder, so women are more affected. Risk rises with intercourse, spermicides, pregnancy, menopause, catheters, obstruction, vesicoureteral reflux and diabetes. Most infections ascend; kidney infection from the bloodstream suggests Staphylococcus aureus bacteremia[1].
The organisms
| Organism | Laboratory features | Setting |
|---|---|---|
| Escherichia coli | Gram-negative rod, lactose fermenter | Most community infections |
| Staphylococcus saprophyticus | Gram-positive coagulase-negative cocci, novobiocin-resistant | Young sexually active women |
| Proteus mirabilis | Non-lactose fermenter, swarming motility, urease-positive | Struvite stones |
| Klebsiella | Mucoid capsule, urease-positive | Community and hospital |
| Enterococcus faecalis | Gram-positive cocci in chains | Hospital and catheter infections |
| Pseudomonas aeruginosa | Oxidase-positive non-fermenter | Catheters, hospital |
The urinalysis
Leukocyte esterase shows white cells. Nitrite shows bacteria that reduce nitrate, mainly the Enterobacterales; staphylococci and enterococci do not, so a negative nitrite does not rule out infection. Sterile pyuria suggests chlamydia or gonorrhea, tuberculosis, interstitial nephritis or partly treated infection[2].
How E. coli attaches
| Virulence factor | Role |
|---|---|
| Type 1 fimbriae | Bind bladder uroplakins; cystitis and intracellular persistence |
| P fimbriae | Bind P blood group antigens on kidney cells; ascent and pyelonephritis |
| Hemolysin | Damages tissue |
| Siderophores | Capture iron |
| Lipopolysaccharide | Fever and septic shock |
Cystitis causes dysuria, frequency, urgency and suprapubic pain without fever or flank pain, and uncomplicated cases are treated with nitrofurantoin, trimethoprim-sulfamethoxazole or fosfomycin[2].
Pyelonephritis
Acute pyelonephritis
Infection of the renal pelvis and parenchyma, usually by ascending E. coli, causes fever, chills, flank pain and costovertebral angle tenderness, often after cystitis symptoms. White cell casts form only in renal tubules, so they place the infection in the kidney, which pyuria, nitrite and bacteria cannot do. Pathology shows patchy neutrophil infiltrates and microabscesses with relatively spared glomeruli[3].
Reflux in children, obstruction, pregnancy, diabetes and catheters predispose to it. In vesicoureteral reflux, a short intravesical ureter lets urine flow back toward the kidney during voiding, carrying bladder bacteria with it. In pregnancy, progesterone relaxes ureteral smooth muscle and the enlarging uterus compresses the ureters, so urine stagnates. That is why pregnant women are screened for bacteria in the urine and treated even without symptoms, unlike most other adults[1]. Complications include sepsis, abscess, papillary necrosis and gas-forming emphysematous pyelonephritis in diabetes. Treatment is antibiotics such as ceftriaxone or a fluoroquinolone and drainage of any obstruction.
Chronic pyelonephritis
Recurrent infection with reflux or obstruction causes coarse, asymmetric scars over blunted calyces, unlike the fine, symmetric granularity of hypertensive kidney disease. Atrophic tubules filled with pink casts resemble thyroid tissue ("thyroidization"), and hypertension and CKD follow[4]. Xanthogranulomatous pyelonephritis, usually with staghorn stones and Proteus, forms a yellow mass of foamy macrophages that can mimic a tumor.
Calcium stones
How stones form
Stones form when urine is supersaturated. Risk rises with low urine volume (the most important modifiable factor), high excretion of calcium, oxalate, uric acid or cystine, low citrate, which keeps calcium soluble, and a urine pH that favors precipitation. Stones cause sudden colicky flank pain radiating to the groin with hematuria, are diagnosed with non-contrast CT, and those up to about 5 mm usually pass[5].
Calcium oxalate
The most common stone, radiopaque, with envelope- or dumbbell-shaped crystals. Causes include idiopathic hypercalciuria (the most common), hyperparathyroidism, low citrate (chronic diarrhea, distal RTA), high uric acid and hyperoxaluria. In fat malabsorption (Crohn disease of the ileum, ileal resection, gastric bypass), unabsorbed fatty acids bind calcium, leaving oxalate free to be absorbed in the colon: enteric hyperoxaluria. Spinach, rhubarb, high-dose vitamin C and ethylene glycol add oxalate[6].
Why so much calcium reaches the urine
In idiopathic hypercalciuria, blood calcium is normal but the gut absorbs more of it and the tubules reclaim less, often in families. A high-sodium diet adds to the problem, because sodium and calcium are reabsorbed together in the proximal tubule, so extra salt in the urine pulls calcium with it[6].
Calcium phosphate
Radiopaque wedge-shaped crystals that form in alkaline urine, linked to distal RTA, hyperparathyroidism and acetazolamide or topiramate.
Prevention
- High fluid intake, aiming for more than about 2.5 L of urine a day.
- Thiazides, which lower urine calcium.
- Potassium citrate, which raises urinary citrate.
- Less sodium and animal protein.
- Normal dietary calcium: restricting calcium leaves more oxalate free and raises stone risk; in enteric hyperoxaluria, calcium taken with meals binds oxalate[6].
Struvite, uric acid and cystine stones
The other stones
| Stone | Urine pH | Crystal | X-ray | Setting | Treatment |
|---|---|---|---|---|---|
| Struvite (magnesium ammonium phosphate) | Alkaline | Coffin lid | Opaque | Urease-producing Proteus or Klebsiella; catheters, neurogenic bladder; staghorns | Complete removal; treat infection |
| Uric acid | Acidic | Rhomboid or rosette | Lucent | Gout, tumor lysis, chronic diarrhea, diabetes | Alkalinize urine; allopurinol |
| Cystine | Acidic | Hexagonal | Faintly opaque | Cystinuria, from youth | Fluids, alkali, tiopronin |
Mechanisms
Struvite: urease splits urea into ammonia, making urine alkaline and supplying ammonium, which precipitates with magnesium and phosphate. Bacteria live inside the stone, so antibiotics alone fail; E. coli does not make urease[5].
Uric acid: it is poorly soluble below a urine pH of about 5.5. Persistently acidic urine in diabetes and metabolic syndrome (impaired ammonium production), chronic diarrhea and high cell turnover favor it. Raising urine pH to about 6.5 with potassium citrate can dissolve existing stones.
Cystine: cystinuria is an autosomal recessive defect of the proximal tubule transporter for cystine, ornithine, lysine and arginine. Only cystine causes trouble, because it is barely soluble in acidic urine; a positive cyanide-nitroprusside test supports the diagnosis[5].
Common confusions
- Cystinuria versus cystinosis: cystinuria causes stones; cystinosis is a lysosomal storage disease that causes Fanconi syndrome, not stones.
- Calcium restriction: it raises calcium oxalate stone risk; keep dietary calcium normal.
- Negative nitrite: does not exclude infection with gram-positive organisms such as S. saprophyticus or enterococci.
- White cell casts: pyelonephritis or interstitial nephritis, never simple cystitis.
References
- Flores-Mireles AL, Walker JN, Caparon M, Hultgren SJ. Urinary tract infections: epidemiology, mechanisms of infection and treatment options. Nat Rev Microbiol. 2015;13(5):269-284. doi:10.1038/nrmicro3432 Link ↩
- Hooton TM. Uncomplicated urinary tract infection. N Engl J Med. 2012;366(11):1028-1037. doi:10.1056/NEJMcp1104429 Link ↩
- Kumar V, Abbas AK, Aster JC. Robbins & Cotran Pathologic Basis of Disease. 10th ed. Elsevier; 2021. ↩
- Peters C, Rushton HG. Vesicoureteral reflux associated renal damage: congenital reflux nephropathy and acquired renal scarring. J Urol. 2010;184(1):265-273. doi:10.1016/j.juro.2010.03.076 Link ↩
- Khan SR, Pearle MS, Robertson WG, et al. Kidney stones. Nat Rev Dis Primers. 2016;2:16008. doi:10.1038/nrdp.2016.8 Link ↩
- Coe FL, Evan A, Worcester E. Kidney stone disease. J Clin Invest. 2005;115(10):2598-2608. doi:10.1172/JCI26662 Link ↩