Robert E. Lee once again began an invasion of the North, in June 1863, and Lincoln urged Hooker to pursue and defeat him. Hooker's initial plan was to seize Richmond instead, but Lincoln immediately vetoed that idea, so the Army of the Potomac began to march north, attempting to locate Lee's Army of Northern Virginia as it slipped down the Shenandoah Valley into Pennsylvania. Hooker's mission was first to protect Washington, D.C., and Baltimore and second to intercept and defeat Lee. Unfortunately, Lincoln was losing any remaining confidence he had in Hooker. Hooker's senior officers expressed to Lincoln their lack of confidence in Hooker, as did Henry Halleck, Lincoln's General-in-chief. When Hooker got into a dispute with Army headquarters over the status of defensive forces in Harpers Ferry, he impulsively offered his resignation in protest, which was quickly accepted by Lincoln and General-in-chief Henry W. Halleck. On June 28, 1863, three days before the climactic Battle of Gettysburg, Hooker was replaced by Maj. Gen. George Meade. Hooker received the Thanks of Congress for his role at the start of the Gettysburg Campaign, but the glory would go to Meade. Hooker's tenure as head of the Army of the Potomac had lasted 5 months.