The liberals (mainly constituted by middle class) tried to unite different regions of German confederation into a united Germany in 1848 governed by an elected Parliament.
This initiative by the liberals was repressed by the combined forces of the monarchy and military supported by the large landowners (called Junkers).
The responsibility of the unification was now taken over by the conservative forces.
The responsibility was assigned to the chief minister of Prussia, Otto von Bismarck.
Three wars with Austria, Denmark and France fought over seven years’ period ended in Prussian victory.
Thus the unification of Germany was completed and the Prussian King, Kaiser William I was proclaimed as the Emperor of Germany on 18 January 1871 at the hall of Mirrors in the Palace of Versailles.