Astrology is a belief in a relation between celestial observations and terrestrial events. People made conscious attempts to measure, record, and predict seasonal changes by reference to astronomical cycles. Early evidence of such practices appears as markings on bones and cave walls, which show that the lunar cycle was being noted as early as 25,000 years ago; the first step towards recording the Moon's influence upon tides and rivers, and towards organizing a communal calendar. With the Neolithic Revolution new needs were also being met by the increasing knowledge of constellations, whose appearances in the night-time sky change with the seasons, thus allowing the rising of particular star-groups to herald annual floods or seasonal activities. By the 3rd millennium BCE, widespread civilisations had developed sophisticated understanding of celestial cycles, and are believed to have consciously oriented their temples to create alignment with the heliacal risings of the stars.
There is scattered evidence to suggest that the oldest known astrological references are copies of texts made during this period, particularly in Mesopotamia. Two, from the Venus tablet of Ammisaduqa (compiled in Babylon round 1700 BC) are reported to have been made during the reign of king Sargon of Akkad (2334–2279 BC). Another, showing an early use of electional astrology, is ascribed to the reign of the Sumerian ruler Gudea of Lagash (c. 2144–2124 BC). However, there is controversy over whether they were genuinely recorded at the time or merely ascribed to ancient rulers by posterity. The oldest undisputed evidence of the use of astrology as an integrated system of knowledge is attributed to records that emerge from the first dynasty of Mesopotamia (1950–1651 BC).