Water supply and sanitation has been a primary logistical challenge since the dawn of civilization. Where water resources or infrastructure or sanitation systems are insufficient for the population, people fall prey to disease, dehydration, and in extreme cases, death.
Major human settlements could initially develop only where fresh surface water was plentiful, such as near rivers or natural springs. Throughout history people have devised systems to make getting water into their communities and households, and disposing (and later also treating) wastewater more convenient.
The historical focus of sewage treatment was on the conveyance of raw sewage to a natural body of water, e.g. a river or ocean, where it would be satisfactorily diluted and dissipated. Early human habitations were often built next to water sources. Rivers would often double as a crude form of natural sewage disposal.
Most of these early sewers received significant amounts of draft animal dung in street runoff; but handling of human waste varied with location. Over the millennia, technology has dramatically increased the distances across which water can be relocated, but the availability of clean and fresh water remains a limiting factor on the size and density of population centers, and is expected to remain so into the foreseeable future.
During the Neolithic, humans dug the first permanent water wells, from where vessels could be filled and carried by hand. Wells dug around 6500 BC have been found in the Jezreel Valley. The size of human settlements was largely dependent on nearby available water.
A primitive indoor, tree bark lined, two channel, stone, fresh and wastewater system appears to have featured in the houses of in Skara Brae, from around 3000 BCE, along with a cell like enclave in a number of houses, that it has been suggested may have functioned as an early indoor toilet.
The Indus Valley Civilization in Asia shows early evidence of public water supply and sanitation. The system the Indus developed and managed included a number of advanced features. A typical example is the Indus city of Lothal (c. 2350 BCE). In Lothal all houses had their own private toilet which was connected to a covered sewer network constructed of brickwork held together with a gypsum-based mortar that emptied either into the surrounding water bodies or alternatively into cesspits, the latter of which were regularly emptied and cleaned.