Since the Peace of Westphalia, the Upper Rhine formed a contentious border between France and Germany. Establishing "natural borders" on the Rhine was a long-term goal of French foreign policy, since the Middle Ages, though the language border was – and is – far more to the west. French leaders, such as Louis XIV and Napoleon Bonaparte, tried with varying degrees of success to annex lands west of the Rhine. The Confederation of the Rhine was established by Napoleon, as a French client state, in 1806 and lasted until 1814, during which time it served as a significant source of resources and military manpower for the First French Empire. In 1840, the Rhine crisis, prompted by French prime minister Adolphe Thiers's desire to reinstate the Rhine as a natural border, led to a diplomatic crisis and a wave of nationalism in Germany.