Napoleon declared himself emperor (Napoleon III) and ended the republic.