Early on April 9, the remnants of John Broun Gordon's corps and Fitzhugh Lee's cavalry formed line of battle at Appomattox Court House. Gen. Robert E. Lee determined to make one last attempt to escape the closing Union pincers and reach his supplies at Lynchburg. At dawn the Confederates advanced, initially gaining ground against Sheridan's cavalry. The arrival of Union infantry, however, stopped the advance in its tracks. Lee's army was now surrounded on three sides. Lee surrendered to Grant on April 9. This was the final engagement of the war in Virginia.