After the collapse of the Holy Roman Empire, the German Confederation was formed in 1815. ... In 1871, Germany became a nation state when most of the German states (most notably excluding Switzerland and Austria) unified into the Prussian-dominated German Empire.