In 1871, King William I was elevated to the status of Emperor ("Kaiser") of a united Germany, and the Stadtschloss became the symbolic heart of the German Empire. The Empire was (in theory) a constitutional state, and from 1894 onwards, the new Reichstag building, the seat of the German parliament came to not only rival but overshadow the Stadtschloss as the Empire's center of power. In conjunction with Germany's defeat in World War I, William II was forced to abdicate both as German Emperor and as King of Prussia. In November 1918, the Spartacist leader, Karl Liebknecht, declared the German Socialist Republic from a balcony of the Stadtschloss, ending more than 400 years of royal occupation of the building.