 From 1797, with the accession of Duke Frederick II, the royal family was again Protestant.Due to the political upheavals during the reign of Napoleon I, and being an ally of Napoleon, Württemberg became a part of the Confederation of the Rhine, Duke Frederick II was made Elector in May 1803, he collected and received secularized and mediated dominions, which greatly enlarged his country in territorial extension.In January 1806 he was made King of Württemberg.