In foreign policy, he changed Russia's position relative to France four times between 1804 and 1812 among neutrality, opposition, and alliance. In 1805 he joined Britain in the War of the Third Coalition against Napoleon, but after suffering massive defeats at the battles of Austerlitz and Friedland, he switched sides and formed an alliance with Napoleon by the Treaty of Tilsit (1807) and joined Napoleon's Continental System. He fought a small-scale naval war against Britain between 1807 and 1812 as well as a short war against Sweden (1808–09) after Sweden's refusal to join the Continental System. Alexander and Napoleon hardly agreed, especially regarding Poland, and the alliance collapsed by 1810. Alexander's greatest triumph came in 1812 when Napoleon's invasion of Russia proved to be a catastrophic disaster for the French. As part of the winning coalition against Napoleon, he gained territory in Finland and Poland. He formed the Holy Alliance to suppress revolutionary movements in Europe which he saw as immoral threats to legitimate Christian monarchs. He also helped Austria's Klemens von Metternich in suppressing all national and liberal movements.