Due to military losses and the need to maintain discipline by example, the German High Command ordered that further punishment units should be formed from the thousands of Wehrmacht military prisoners held in its military prisons. These Strafbataillon, which were under the control of the Feldgendarmerie, were then used to conduct dangerous operations (sometimes akin to suicide missions) for the Heer such as clearing minefields, assaulting difficult objectives and defending positions against overwhelming attacking forces. They were also made to do manual hard labor in front-line locations, building and repairing military infrastructure and defenses.