A sudden change in the country's demographics occurred in the mid-17th century. The Second Northern War and the Deluge followed by famine in the period from 1648 to 1657 were accountable for at least 4 million deaths. Coupled with further territorial losses, by 1717 the population had fallen to 9 million. The population slowly recovered throughout the 18th century; just before the first partition of Poland in 1772, the Commonwealth's population was 14 million, including around 1 million nobles. In 1792, the population of Poland was around 11 million and included 750,000 nobles.