During the US Civil War, nearly 200 000 African Americans fought and more than 30 000 died for their freedom and for the salvation of the Union. Afterward Congress authorized the official formation of 6 all-black peacetime military units with the Reorganization Act of July 28, 1866.
These units were made up of Civil War veterans as well as newly freed slaves who were eager to have an honorable vocation that promised income, food, clothing, and shelter; albeit what they received was mostly the cast-offs from other units. Subject to the racism of the white commanding officers and the people they were ordered to protect, these soldiers remained loyal and had the lowest desertion rate of any enlisted men.
Hildreth CJ. Black Indian-Buffalo Soldiers. JAMA. 2009;301(5):465. doi:10.1001/jama.2009.72