Pyelonephritis has several different causes. Most commonly, it results when bacteria in the bladder or urethra are transmitted to the kidneys via the urinary tract. Infection in this manner is most likely to occur when the proper function of the urinary tract is impaired, for instance through a kidney stone or enlarged prostate. Bacteria may also be carried to the kidneys from other parts of the body through the bloodstream. In rare cases, infection can occur following kidney surgery or the long-term use of instruments such as catheters inside the urinary tract.