In July 1807 the Duchy of Warsaw was created. In its government Poniatowski on 7 October became Minister of War and Head of Army of the Duchy of Warsaw ("minister wojny i naczelny wódz wojsk Ks. Warszawskiego"), while Napoleon, not yet quite trusting him, left the supreme military command in Davout's hands until summer of 1808. Poniatowski officially became Commander in Chief on 21 March 1809. The Minister of War became completely devoted to the creation and development of this new, ostentatiously Polish army. The Duchy's army existed and operated under most difficult circumstances and its success depended largely on the military and political skills of the chief commander. For example, it was severely underfunded and most of the military units were kept by Napoleon outside of the country, to be used in numerous campaigns, which is why Prince Józef had a rather small force at his disposal during the war of 1809.