Despite attempts by the new shōgun to reform the government, he was unable to contain the growing movement to overthrow the shogunate led by Satsuma and Chōshū. Even after he stepped down as "shōgun" and agreed to return the power to the Imperial court, the two sides finally clashed in the Battle of Toba–Fushimi 1868. The shōgun, defeated, escaped to Edo. Saigo Takamori then led his troops to Edo, where Tenshō-in was instrumental in the bloodless surrender of Edo castle. The Boshin War continued until the last of the shogunate forces were defeated in 1869.