An alliance of European armies finally defeated Napoleon in 1814. Then all the European countries held meetings known as the Congress of Vienna. They wanted to figure out the best way to stop anyone from conquering them again. They were trying to keep peace all over Europe. One of the things they did was to establish a German federal government. That united a lot of smaller countries that mostly spoke some kind of German, to replace the old Holy Roman Empire. But Prussia was still an independent country, and a very powerful one. Prussia covered what is now the eastern half of Germany and also controlled a lot of what is now Poland.
The German Confederation was supposed to keep France and Prussia and Austria-Hungary from fighting each other. Or at least, it encouraged them to fight each other in Germany instead of in their own countries. But the agreement didn’t really manage to keep the peace.
Germany was getting better at farming the new crops of potatoes and sugar beets.More families got rich enough to send their kids to school. They built new cloth factories. Engineers built railroads and mined coal. All of this made Germany richer. And because people were richer, fewer children died. There got to be a lot more people in Germany. These Germans wanted to live like richer people: they wanted some political power.
In 1848, working people in Germany tried to get more power by revolution, just as they had earlier that year in France and in Austria-Hungary. They wanted freedom of the press, freedom of assembly, a written constitution, and an elected parliament. So they wanted the vote. Karl Marx was involved. But the revolution failed. Many of its leaders and supporters left Germany for the United States or for Brazil.
Then in the 1860s the prime minister of Prussia, Bismarck, succeeded in combining Prussia and Germany into a big German Empire. His German Empire covered the whole middle of Europe. Bismarck saw himself as a second Augustus or Napoleon. (Just what the Congress of Vienna was supposed to prevent!) So he used his new Empire to attack Denmark, Austria, and France. Austria, under Sophie and then her son Franz Joseph, got so weak it had to do pretty much whatever Germany wanted. Then, fighting against Napoleon III in France, Germany won some big victories, and even marched through Paris. Germany took over some of France’s eastern land. And they made France pay huge amounts of money to Germany. That was revenge for the money Napoleon I had taken from Prussia. The excitement of winning wars encouraged Germany to agree to be one country. Like Britain and France, Germany also started to take control of parts of Africa. Germany colonized Togo and part of Ghana, Cameroon, Rwanda, and Namibia.
As people in Germany got richer, they wanted the power rich people had always had. But instead of giving people more power, as Britain had, and as Sophie did in Austria and Andrew Jackson did in the United States, Bismarck ruled more like the Russian czars: by force. He stopped letting the Parliament meet. He limited freedom of speech, and banned Socialism. In 1866, a Jewish activist shot Bismarck, but Bismarck survived. In the 1870s, Bismarck persecuted Catholics too – he threw out the Jesuits in 1872. But Bismarck got support by giving workers a lot of government help if they got sick, were out of work, or retired.
Then in 1888, the new Kaiser Wilhelm II, still in his 20s, wanted to strengthen and expand German power instead of keeping peace in Europe. In 1890 Kaiser Wilhelm forced Bismarck to retire (at 75). Without Bismarck, Kaiser Wilhelm didn’t do as well. He made enemies where Bismarck had made friends. The end result, in 1914, was World War I.