In late June 1862, Robert E. Lee launched an offensive to relieve the threat on Richmond posed by Maj. Gen. George McClellan and the Army of the Potomac. On June 26, Lee struck the Union V Corps under Maj. Gen. Fitz John Porter at Mechanicsville in the first of the Seven Days' Battles. Porter withdrew that night to a new position near Gaines' Mill. Lee attacked again the next day in what became the largest of the Seven Days' Battles.