History of water supply and sanitation
Ever since the emergence of sedentary societies (often precipitated by the development of agriculture), human settlements have had to contend with the closely-related logistical challenges of sanitation and of reliably obtaining clean water. Where water resources, infrastructure or sanitation systems were insufficient, diseases spread and people fell sick or died prematurely.
Major human settlements could initially develop only where fresh surface water was plentiful—for instance, in areas near rivers or natural springs. Over time, various societies devised a variety of systems which made it easier to obtain clean water or to dispose of (and, later, also treat) wastewater.
For much of this history, sewage treatment consisted in the conveyance of raw sewage to a natural body of water—such as a river or ocean—in which, after disposal, it would be diluted and eventually dissipate.
Over the course of millennia, technological advances have significantly increased the distances across which water can be practically transported. Similarly, treatment processes to purify drinking water and to treat wastewater have also improved.