Japan during the 8^<th> century AD was governed under a highly sophisticated Chinese legal system of administrative and penal codes, called ritsuryo whose regional military affairs were carried out by locally based regiments. This article intends to clarify the character of such gundan acting under the detailed provisions of the ritsuryo military code and how they functioned within the system of local governance. The focus is placed on regiment commanders (referred to generically as gunki) and the nature and origins of their relationship to provincial governors in commanding the gundan. The author concludes from his investigation that commanding officers were 1) soldiers with specialized military skills (shi), 2) were commanders capable of mobilizing a fully prepared gundan at a moment's notice, emphasizing training in specialized skills enabling their troops to respond effectively to even the most unexpected occurrences, and 3) orchestrated the military force which supported the ruling authority of provincial governors. The regimental order was by and large fiscally supported by the provincial and district (gun) governments. The gundan were organized based on the practices of Emperor Tenmu in his victory during the Jinshin War of Succession (672), in which the military forces under the command of influential local families were mobilized by the central government, thus ensuring military support for the regimes of provincial governors and maintaining the status quo. However, not only the internal factors of the Jinshin War, but also the external factor of national security in the wake of the defeat at Hakusuki-no-E should be taken into consideration. In contrast to regional military forces prior to the 7^<th> century, the significance of the formation of the ritsuryo gundan system should be sought in the creation of a standing army under the command of provincial governors ready to be utilized by the central government in response to its political agenda for governing the archipelago.