The American Civil War effectively ended on April 9, 1865, when Confederate General Robert E. Lee surrendered his Army of Northern Virginia to Union General Ulysses S. Grant at Appomattox Court House, Virginia. However, some Confederate forces continued to surrender over the following months, and the last Confederate land surrender was on June 23, 1865. The final Confederate ship, the CSS Shenandoah, surrendered on November 6, 1865. Legally, the Civil War was declared over by President Andrew Johnson in a proclamation on August 20, 1866, when he announced that the insurrection was at an end and peace and civil authority were restored throughout the United States. This date is recognized by courts, Congress, and other official entities as the legal end of the Civil War.