Until about 12,000 years ago (the beginning of the Holocene), all humans lived as hunter-gatherers, generally in small nomadic groups known as band societies, often in caves. The Neolithic Revolution (the invention of agriculture) took place beginning about 10,000 years ago, first in the Fertile Crescent, spreading through large parts of the Old World over the following millennia, and independently in Mesoamerica about 6,000 years ago. Access to food surplus led to the formation of permanent human settlements, the domestication of animals and the use of metal tools for the first time in history.