The rise of German Unification came about because of an increase in nationalism as well as a reduction in the number of independent German states. Bismarck created a unified Germany using a combination of wars and treaties as well as viciously repressing his own people.
Bismarck embarked on an aggressive foreign policy in hopes of uniting Germany. He modernized the Prussian armies by giving them the newest weapons. In 1864, he made a temporary alliance with Austria against Denmark and the territories of Schleswig and Holstein. After defeating the Danes, Austria got Holstein while Bismarck got Schleswig. This system helped spark a war with Austria. In 1866, after securing an alliance with Italy and France(proving that the enemy of my enemy is my friend), Bismarck attacked Austria and defeated her in 8 weeks. Instead of ruling Austria with an iron fist, Bismarck treated her with leniency to keep them out of his future plans. Bismarck consolidated the smaller German states into his empire because the small states were afraid of France. In addition, he was able to annex Alsace-Lorraine from the French following the battle of Sedan, which Bismarck had provoked them into fighting.
Bismarck also worried about the internal dangers facing a unified Germany and he directed his fear against the Catholics and socialists. Fearful that Catholics owed allegiance to an agency that was not part of the state, Bismarck responded with an attack on the church known as the "Kulturkampf," in which he insisted on controlling every aspect of the church. He also attempted to ban the socialists from gathering and meeting. In addition, he limited the political appeal of the Marxists by establishing a light form of welfare. However, in the case of both the Catholics and socialists, Bismarck found that oppression merely increased their popularity.