The Kingdom of Wurttemberg was founded in 1495 by Eberhard I, the Count of Württemberg. The kingdom was a dependency of Austria from 1495 onward, being a strict ally. In 1706, it was occupied by French troops when Württemberg joined Austria in the War of the Grand Alliance, named after the "Grand Alliance", the coalition founded by Austria in order to prevent the expansion of the Kingdom of France, whose monarch Louis XIV of France collected several troops in order to further the borders of his empire. Württemberg became independent later on that year, and in 1708, re-joined the Grand Alliance when King Ludwig Eugen I was pressured to do so, following the death of pro-Austria king Eberhard Ludwig I. For a while, Württemberg became a French protectorate.
In 1783, Württemberg became independent, with Karl I as monarch. In 1799, it was conquered by Prussia, but became independent in 1829. From 1829 to 1832, its monarch was Karl II, but in 1832, the country was occupied by Prussia once more. Württemberg was made a protectorate and in 1870 joined the German Empire formed by Prussia, and they remained part of the German confederation until 1918, with the end of World War I.