However, Hideyoshi died in 1598 and his armies lost the Battle of Sekigahara to Tokugawa Ieyasu in 1600, who then seized power. Continuing to view the young Hideyori as a potential threat, Ieyasu attacked Hideyori in the Siege of Osaka in 1614. The attack failed, but Hideyori was induced to sign a truce and dismantle the defenses of his stronghold Osaka Castle.
In 1615, Ieyasu betrayed the truce and attacked again. Hideyori was forced to flee to the mountains, where he committed suicide at the age of 22, putting an end to the Toyotomi clan and paving the way for the 250-year Tokugawa Shogunate.