Russia had previously been an ally of Sweden in the Third and Fourth Coalitions against France, but after Russia's defeat at Friedland, she joined France and attacked Sweden so as to compel her to join Napoleon's Continental System. The primary result of the treaty was Sweden's agreement to join the Continental System, so that Sweden would not trade with the United Kingdom.