On the morning of April 9, 1865, remaining Confederate forces formed a line of battle at Appomattox Court House. General Lee was trying to make a last attempt to escape the closing Union forces, so he could reach Lynchburg, where he had supplies. The Confederates were advancing, until the Union infantry stopped them. After the battle Lee was surrounded on three sides. Later that say Lee surrendered to Grant. This was the end of the Civil War.