From 1848 to 1864, Denmark and the German Confederation fought over control of the two duchies of Schleswig and Holstein. Historically, the duchies had been ruled by Denmark since medieval times, but there remained a large German majority. This majority was sparked to rebellion after Frederick VII of Denmark announced on 27 March 1848 the duchies would become an integral part of Denmark under his new liberal constitution. Prussia soon became involved, supporting the uprising and beginning the First Schleswig War. Ernest sent 8,000 men initially, adding to the army sent by the German Confederation. He also desired to be given a military job during the war, but was refused, as it was "extremely difficult to offer me a position in the army of Schleswig-Holstein corresponding to my rank", according to his memoirs. He agreed to a smaller command, coming to lead a Thuringian contingent; he commented in a letter to his brother that "I should have declined any other command of the kind, but I could not refuse this one, as, in the present condition of our States, it is important to keep the executive power in our hands". As commander of a German corps, Ernest was instrumental in winning the 5 April 1849 battle of Eckernförde against Danish forces, capturing two frigates. Also at this time, Ernest took an interest in the Frankfurt Parliament and may have hoped to be chosen German Emperor, but instead he urged King Frederick of Prussia to take that position, albeit unsuccessfully. Ernest also brought about a Berlin conference of German princes in 1850; he highly valued such opportunities for the political influence they brought him.