Through the Treaties of Tilsit in July 1807, France made peace with Russia, which agreed to join the Continental System. The treaty was particularly harsh on Prussia, however, as Napoleon demanded much of the Prussian territory along the lower Rhine west of the Elbe and in what was part of the former Polish–Lithuanian Commonwealth. Respectively, these acquisitions were incorporated into the new Kingdom of Westphalia, led by his brother Jérôme Bonaparte. He also established the Duchy of Warsaw, ruled by his new ally the king of Saxony. At the end of the war Napoleon was master of almost all of western and central continental Europe, except for Spain, Portugal, Austria and several other smaller states.