In 1870, when the military forces of the Kingdom of Italy captured Rome, overthrowing what was left of the Papal States, the Italian government intended to allow the pope to keep the Leonine City as a small remnant Papal State. However, Pope Pius IX would not agree to that arrangement, and thus there was a 59-year standoff, when the Popes were a "prisoner in the Vatican", settled in 1929 by the Lateran Treaty, which recognized the sovereignty and independence of Vatican City.