 In 1796, during the French Revolutionary Wars, French troops under Napoleon Bonaparte invaded Rome and took as prisoner Pope Pius VI.He was taken as prisoner to France, where he died in 1799.The following year, after a "sede vacante" period lasting approximately six months, Chiaramonti was elected to the papacy, taking the name Pius VII.