In 1818, he was appointed ambassador simultaneously to the Kingdom of Württemberg in Stuttgart and the Grand Duchy of Baden in Karlsruhe, but in 1820 a political dispute with the Russian government, caused by his public defence of the beginnings of democratic government in these states, led to his resignation and self-imposed exile, although he continued to receive a salary and remain, theoretically at least, available for service. During this period he turns up for varying lengths of time in Austria (1821–1822, in Vienna, Graz, Prague, Teplitz), Switzerland, France (1823–1824 in Paris), Germany (1825-6, in Berlin), the Netherlands and London (from 1829).