UTIs are primarily caused by the bacterium Escherichia coli (E. coli). This bacterium commonly resides in the gastrointestinal tract but can enter the urinary tract through the urethra. Other factors contributing to UTIs include sexual activity, certain types of contraception, and a weakened immune system.