Valley Forge functioned as the third of eight winter encampments for the Continental Army's main body, commanded by General George Washington, during the American Revolutionary War. In September 1777, Congress fled Philadelphia to escape the British capture of the city. After failing to retake Philadelphia, Washington led his 12,000-man army into winter quarters at Valley Forge, located approximately 18 miles (29 km) northwest of Philadelphia. They remained there for six months, from December 19, 1777 to June 19, 1778. At Valley Forge, the Continentals struggled to manage a disastrous supply crisis while retraining and reorganizing their units. About 1,700 to 2,000 soldiers died from disease, possibly exacerbated by malnutrition.