Urinary tract infection (UTI) is a bacterial infection of either the upper (kidneys and ureters) or lower (bladder and urethra) urinary tract. Infections of the bladder and urethra cause cystitis and urethritis, respectively. The bacteria may enter the urethral opening following sexual intercourse, or less frequently the kidneys may be infected first, from blood-borne bacteria. UTI is very common and primarily affects females, but males may also be affected.