Holy Roman Empire
The empire was dissolved on 6 August 1806, when the last Holy Roman Emperor Francis II (from 1804, Emperor Francis I of Austria) abdicated, following a military defeat by the French under Napoleon at Austerlitz (see Treaty of Pressburg). Napoleon reorganized much of the Empire into the Confederation of the Rhine, a French satellite. Francis' House of Habsburg-Lorraine survived the demise of the empire, continuing to reign as Emperors of Austria and Kings of Hungary until the Habsburg empire's final dissolution in 1918 in the aftermath of World War I.
Romulus Augustulus
Some sources suggest that Julius Nepos claimed to hold legally the title of emperor when Odoacer took power. However, few of Nepos' contemporaries were willing to support his cause after he fled to Dalmatia. Some historians regard Julius Nepos, who ruled in Dalmatia until being murdered in 480, as the last lawful Western Roman Emperor.