Until 1871, Germany had been divided into dozens of small states. This was the old Holy Roman Empire of the German nation, which had existed for 900 years until it finally collapsed under Napoleonic pressure.