In the spring of 1861, Union forces rushed into northwestern Virginia to secure the vital Baltimore and Ohio Railroad, protect important turnpikes, and support Unionists against Confederates. Between June and December, the two sides fought numerous engagements, including Philippi, Rich Mountain, Corricks Ford, Cheat Summit Fort, Carnifex Ferry, and Camp Allegheny. The many Union victories made Gen. George B. McClellan's reputation and damaged that of Confederate Gen. Robert E. Lee, though that situation was reversed in 1862. Despite later Confederate raids, today's West Virginia remained largely under Federal control for the rest of the war. On July 11, 1861, in one of the first important Union victories of the Civil War, Union Gen. George B. McClellan's forces defeated part of Confederate Gen. Robert S. Garnett's command at the Hart Farm on Rich Mountain. Garnett was holding the area around Beverly, where two important turnpikes met, and because he believed the Rich Mountain defenses were virtually impregnable, he had left a small force under Lt. Col. John Pegram to hold the pass. Union Gen. William S. Rosecrans attacked uphill in pouring rain and overran the Confederate position. That night, the Confederates abandoned Camp Garnett at the western base of the mountain and fled east through dark woods. Two days later, almost 600 of them surrendered to McClellan in Beverly, while others escaped south under the guidance of Jedediah Hotchkiss. This small but important victory helped secure Union control of Virginia's western counties, contributed to the drive for West Virginia statehood achieved in 1863, and helped catapult McClellan to command of the Army of the Potomac.