During the 1700s, Prussia had been steadily increasing in power and prestige. Frederick the Great had built an efficient state and a strong army. During the Napoleonic period, however, Frederick William III ruled Prussia, and was proving to be a fairly inept king. In 1806, he made the major mistake of putting Prussia into war with the French without any allies, resulting in crushing defeats at Jena and Auerstadt. With these losses, Napoleon lopped off a considerable amount of Prussian land, adding this territory to the Confederation of the Rhine and the Grand Duchy of Warsaw.
But despite Frederick William III's blunders, the German nationalist movement looked favorably on Prussia. For all its problems, at least Prussia had stood up to Napoleon instead of bowing and scraping before as did the sycophant princes of the Confederation of the Rhine. In losing, Prussia became a center for the German patriots.
After the disastrous defeats of 1806, Prussia undertook a program of army reform under Scharnhost and Gneisenau. Invariably, these reformers followed the French model, calling for changes that would increase competition for positions, and open positions up to everyone based on talent, rather than on birth.
Other reformers, such as Baron Stein and Hardenberg, worked to modernize the Prussian state. Baron Stein had been a knight in the Holy Roman Empire. In the Napoleonic era, his goal became to release the potential dynamics of the Prussian people. In 1807 he became a Prussian administrator and became famous for "abolishing serfdom". Although Stein didn't quite abolish serfdom, he did lessen the restriction of opportunity for the lower classes, paving the way for a modern, free-market economy. Napoleon became worried about Stein's program for modernizing Prussia; in 1808, he commanded Frederick William III to force Stein out of office.
Hardenberg basically filled the exiled Stein's shoes when he became the Prussian chancellor in 1810. Under Hardenberg, the state confiscated church property, gave Jews legal equality, and ended the monopolistic power of guilds. He also started to move Frederick William III toward accepting a constitutional monarchy, though he did not succeed in this task. Still, the pressure of ultimate defeat at the hands of Napoleon motivated the Prussian ruler to accept reforms more rapidly than he might have otherwise.
As these reforms took place, the Prussian people became increasingly excited and unified. Even professors got in on the act. In June 1808, professors in Konigsberg started an anti-French, Prussian nationalist movement called the "Moral and Scientific Union", or Tugenbund (League of Virtue). Prussian national pride soared, the nation increased its resolve to fight Napoleon, and Prussia became a focal point for German nationalism.
It is odd that Prussia would become such a focus of German nationalism. Until this time, Prussia had basically been ignored by the western parts of Germany, who saw Prussia as existing on the German cultural fringe. Further, after the defeats of 1806, Prussia stood in a sorry state, led by an unexciting king. However, able administrators emerged who employed French reforming techniques while capitalizing on anti-French nationalism. By 1815, the Prussian state, economy, and army were once again powerful, and played a substantial role in bringing down Napoleon at Waterloo.
Prussia's military reforms under Scharnhost and Gneisenau mirrored French liberalizing reforms in many ways. Yet whereas the French made these changes from the "bottom up", in response to a revolution by underprivileged classes, Prussia made similar changes, but from the "top down." The Prussian changes were made not to affirm the dignity of all men, as might be claimed for French liberalization, but to help Prussia improve its military. Prussia's modernization of its military and economy were pragmatically rather than philosophically based: Prussia wanted to keep up with the French. Gneisenau had fought for England during the American War of Independence, and he had been very impressed by the power of patriotism to make the American revolutionaries into an effective fighting force. Gneisenau had seen similar developments in France, and knew that the French army derived much of its strength from a similar sense patriotic pride. Based on these two models, Gneisenau concluded that he could harness a patriotic power by opening posts to individuals based on talent resulted in an improved fighting force. The army, then, is a perfect example of the fact that liberalization of Prussian institutions took place not for ideological reasons, but out of a desire to beat France.
Thus, the furnace of the Napoleonic Wars actually encouraged Prussia to make liberal reforms. The reformer's intent may have been to prepare Prussia for battle, but the ultimate result was a considerable amount of progressive change.