Pyelonephritis or this infection of the kidneys is most often a result of an infection that has spread up the urinary tract, or from a blockage in the urinary tract. A blockage causes urine to back up into the ureters and kidneys.