McClellan's Peninsula Campaign toward Richmond stalled at the Battle of Seven Pines on May 31 and June 1. After the Valley Campaign ended in mid-June, Jackson and his troops were called to join Robert E. Lee's Army of Northern Virginia in defense of the capital. By utilizing a railroad tunnel under the Blue Ridge Mountains and then transporting troops to Hanover County on the Virginia Central Railroad, Jackson and his forces made a surprise appearance in front of McClellan at Mechanicsville. Reports had last placed Jackson's forces in the Shenandoah Valley; their presence near Richmond added greatly to the Union commander's overestimation of the strength and numbers of the forces before him. This proved a crucial factor in McClellan's decision to re-establish his base at a point many miles downstream from Richmond on the James River at Harrison's Landing, essentially a retreat that ended the Peninsula Campaign and prolonged the war almost three more years.