By the end of the Civil War, roughly 179,000 black men (10% of the Union Army) served as soldiers in the U.S. Army and another 19,000 served in the Navy. Nearly 40,000 black soldiers died over the course of the war—30,000 of infection or disease. Black soldiers served in artillery and infantry and performed all noncombat support functions including carpenters, chaplains, cooks, guards, laborers, nurses, scouts, spies, steamboat pilots, surgeons, and teamsters also contributed to the war cause. There were nearly 80 black commissioned officers. Black women, who could not formally join the Army, served as nurses, spies, and scouts.