The wu-pao system 伍保制 in the T'ang dynasty originated from the military talion, and influenced by regulations of the Ch'in, Han, Wei, Chin, and the Northern-Southern Dynasties aiming to maintain local order and establish group safety network, and secure the judicial authority. Nonetheless, the allied defense and mutual protection under that system stemmed from the officials' mandatory regulations, not from the people's free will. Thus the demands and punishments were usually cruel. The wu-pao system called for guarantee among five households, and was a most elementary form of the local system in the T'ang dynasty, while there was no so-called lin 鄰 structure beneath it. The wu-pao system primarily consisted of men of at least 16 years of age in general civilian households, and women, elders, children, and the diseased were excluded from it. However, during the middle and late T'ang, owing to complicated social and political situations, the government often at critical moments set up t'uan-pao 團保, pao-she 保社 and the like to compensate the deficiency of the wu-pao system. The traditional function of the wu-pao system lay primarily in maintaining social order, while the government demanded it to engage in activities for verifying household records, prosecuting and arresting criminals and thieves. The functions of the wu-pao system had later expanded into the domain of state finance and economy, such as cultivating the escapees' farmalands, apying taxes on the escapees' account, preventing financial swindling, etc. In addition, at the occurrence of a judicial case, the members of that system might be required to testify. But the system used at the local elementary level did not serve the guarantee of liabilities, yet the liability guarantors might have been those from the wu-pao system.