During 1864 and 1865, Lee fought Union general Ulysses S. Grant in Virginia. During the end of 1864 and the beginning of 1865, Lee and Grant fought near Richmond, Virginia in a series of battles called the Siege of Petersburg. In April 1865, Grant forced Lee to retreat from Richmond. After a series of battles, Grant surrounded Lee near Appomattox Courthouse and forced Lee to surrender. Before he surrendered, he said "I would rather die a thousand deaths than surrender".