After the Maryland Campaign and the bloody Battle of Antietam, the Army of Northern Virginia under General Robert E. Lee retreated south into Virginia. Lee's rearguard action at the Battle of Shepherdstown convinced Union General George B. McClellan not to follow him too closely. McClellan, after asking twice for more reinforcements, decided it was safer to stay put and defend Maryland. On October 6, President Abraham Lincoln instructed McClellan to go after the Confederates in Virginia. Although he had 100,000 men he complained he did not have enough troops and supplies to cross into Virginia. Finally, at the end of October, by which time Lee's army was rested and resupplied, McClellan slowly moved his army south. But he did not engage them. Lincoln waited until after the elections of 1862 before replacing McClellan. The President had already planned to replace McClellan for some time. Before the autumn of 1862 he had offered command of the Army of the Potomac to Ambrose Burnside twice. Burnside turned Lincoln down both times. Finally, on November 7, Lincoln replaced McClellan as Burnside reluctantly accepted the job.