5th millennium BC and recorded in the written history of Ancient Egypt and Mesopotamia.
As almost any cereal containing certain sugars can undergo spontaneous fermentation due to wild yeasts in the air, it is possible that beer-like beverages were independently developed throughout the world soon after a tribe or culture had domesticated cereal. Chemical tests of ancient pottery jars reveal that beer was produced about 7,000 years ago in what is today Iran, and was one of the first-known biological engineering tasks where the biological process of fermentation is used in a process.
In Mesopotamia, the oldest evidence of beer is believed to be a 6,000-year-old Sumerian tablet depicting people drinking a beverage through reed straws from a communal bowl. A 3900-year-old Sumerian poem honoring Ninkasi, the patron goddess of brewing, contains the oldest surviving beer recipe, describing the production of beer from barley via bread.