@Walter Hinteler,
Under the imperial constitution of 1871, Bavaria was incorporated with the German empire, reserving however, certain separate privileges (Sonderrechte) in respect to the administration of the army, the railways, the mail, and the excise duties on beer, the rights of domicile and the insurance of real estate. The King of Bavaria was the supreme chief of the Bavarian Army. Though Bavaria became an integral part of the new German empire, she reserved a larger measure of sovereign independence than any of the other constituent states. Thus she retained a separate diplomatic service, military administration, postal, telegraph and railway systems. Bavaria had six votes in the Bundesrat and sent forty-eight deputies to the Reichstag.
Bavaria had a military treaty with Prussia from November 23, 1870. Prior to that, there was a mutual defense alliance, which placed the Bavarian army under the Prussian king during time of war. What made Bavaria significantly different than the other states was that articles 61-68 of the North German Confederation Constitution did not apply to Bavaria. As these where the military clauses, Bavaria maintained significant independence in military matters. This treaty was specifically referenced in the Imperial German Constitution section IX. Similar to the other kingdoms of Saxony and Württemberg, there were two Bavarian infantry regiments garrisoned in Lorraine. However, due to the treaty of 1870 these were under control of the Bavarian II Corps in peacetime, rather than the corps area that they were stationed in. The Bavarian Army formed a separate portion of the army of the German empire, with a separate administration. There were three separate Bavarian army corps and Bavarian regiments did not participate in the sequential numbering of the Prussian army. The regulations applicable to other sections of the whole imperial army were, however, observed.