In April 1862, Union Gen. George B. McClellan marched the Army of the Potomac west up the Peninsula between the James and York Rivers from Fort Monroe toward Richmond, the Confederate capital. Gen. John B. Magruder’s forces delayed the Federals for almost a month at Yorktown. Reinforced by Gen. Joseph E. Johnston but still vastly outnumbered, the Confederates withdrew fighting up the Peninsula to Richmond. Gen. Robert E. Lee took command of the Army of Northern Virginia when Johnston fell wounded on May 31. Beginning on June 26, Lee counter-attacked and forced the Federals away from the city in the series of actions known as the Seven Days’ Battles. The fighting ended after the bloody Battle of Malvern Hill on July 1, and McClellan eventually withdrew to Fort Monroe.