During the American Civil War, as a war necessity, the Militia Act of 1862, for the first time, allowed African-Americans to serve in the Union militias as soldiers and war laborers. By such enrolment, these blacks and their families were freed from slavery, if their owner was a rebel. However, black members were discriminated against in pay, with black members being paid half of white members. Besides discrimination in pay, colored units were often disproportionately assigned laborer work, rather than combat assignments. General Daniel Ullman, commander of the Corps d'Afrique, remarked "I fear that many high officials outside of Washington have no other intention than that these men shall be used as diggers and drudges." Black members were organised into colored regiments. By the end of that war, in April 1865, there were 175 colored regiments constituting about one-tenth of the Union Army. About 20% of colored soldiers died, about 35% higher than that of white Union troops. The 1862 Militia Act, however, did not open military service to all races, only to black Americans. Non-whites were not permitted to serve in the Confederate army, except sometimes for camp labor.