Hagerstown's strategic location at the border between the North and the South made the city a primary staging area and supply center for four major campaigns during the Civil War: In 1861, General Robert Patterson's troops used Hagerstown as a base to attack Virginia rebels in the Shenandoah Valley Campaign. In the Maryland Campaign of 1862, General James Longstreet's command occupied the town while en route to the Battle of South Mountain and Antietam. In 1863, the city was the site of several military incursions and engagements as General Lee's army invaded then retreated from the Gettysburg Campaign. In 1864, Hagerstown was invaded by the Confederate Army under General Jubal Early. On Wednesday, July 6th, Early sent 1,500 cavalry, commanded by Brigadier-General John McCausland, into Hagerstown to levy a ransom for $200,000 and a large amount of clothing, in retribution for Federal destruction of farms, feed and cattle in the Shenandoah Valley.