Valley Forge functioned as the third of eight military encampments for the Continental Army's main body, commanded by General George Washington. In September 1777, British forces had captured the American capital of Philadelphia. After failing to retake the city, Washington led his 12,000-man army into winter quarters at Valley Forge, located approximately 18 miles (29 km) northwest of Philadelphia.