With the Emancipation Proclamation begun on January 1, 1863, Lincoln ordered the freedom of all slaves in those states still in rebellion during the American Civil War. It did not actually immediately free all those slaves however, since those areas were still controlled by the rebelling states of the Confederacy. Only a small number of slaves already behind Union lines were immediately freed. As the Union army advanced, nearly all four million slaves were effectively freed. Some former slaves joined the Union army after 1862.