On April 18, 1861 Lee was offered field command of the United States Army. On the following day, he received word that Virginia had seceded from the Union, after which he submitted his letter of resignation from the United States Army. Three days later, Lee accepted the position of commander of Confederate forces in the state of Virginia. At the age of 55, on May 31, 1862, Robert E. Lee was assigned to command the Army of Northern Virginia. His army was always outnumbered, out gunned, and often in a poor position to attack or defend. However, Lee was a practical strategist with an engineer's sense, who was willing to take risks to outmaneuver his opponents. He is best known for his victories in the Battle of Second Manassas, in 1862, and the Battle of Chancellorsville, in 1863. On February 6, 1865, he was named General-In-Chief of all Confederate Armies, however, a little over three months later, on April 9, 1865, he surrendered to Union general U.S. Grant at Appomattox Court House. Although he was not the last to surrender, his surrender marked the end of the war.