For nearly as long as humans have walked the Earth, they've had beer waiting for them when they got home. Beer and brewing date back thousands of years, but it's still anyone's guess which ancient culture drank the first beer.

UC Berkeley anthropologist Christine Harstorf discussed just this conundrum in a recent lecture at New York University. Beer is found throughout human history and prehistory, but tracking down its precise origins has been rather tricky. It's possible that very early humans were making beer around some of the first fire sites and settlements - we don't have strong evidence for it just yet, but many experts suspect beer goes all the way back to the development of cooking some 250,000 years ago.

Beer definitively enters the historical record around 4000 BC, when Sumerian tablets in ancient Mesopotamia record the trade of beer. 2,200 years later - a reminder of how mind-bogglingly long-lasting these ancient cultures were - a Sumerian inscribed on a Cuneiform tablet an ode to the goddess of beer, known as Ninkasi. The beer goddess's poem includes such killer lines as "Ninkasi, you are the one who pours out the filtered beer of the collector vat" and "It is [like] the onrush of Tigris and Euphrates."

The very fact that Sumerians bothered having a goddess of beer suggests the importance of the beverage to their culture, and Harstorf speculates that the fact that Ninkasi was a goddess might mean brewing was a traditionally female activity in ancient Sumer. Ancient Egypt also took great pride in their beer, building surprisingly large breweries and leaving clear enough records of their recipes that modern brewers have been able to revive them.

But even these examples pale in comparison to the drinks of the Neolithic Chinese, who were making "a mixed fermented beverage of rice, honey, and fruit (hawthorn fruit and/or grape)" some 9000 years ago. Technically, this was more of a hybrid between wine and beer, but I can't imagine anyone cared too much about such details after drinking five or six of them.

So why has beer been such a big deal to humanity? Scientific American explains Hastorf's crucial arguments:

It is a social beverage, certainly, which contributes to its ongoing popularity today. But perhaps of equal importance thousands of years ago were beer's health benefits-its nutritional value and its importance as a purified drinking liquid in places where water supplies were unsafe. On top of that, beer is relatively easy to brew and can be made from just about anything-all you need is water, cooking heat and some form of carbohydrate, along with enzymes and yeast that are abundant in nature.

Indeed, some theories hold that the first domesticated cereal crops were used to make beer, rather than the more orthodox suggestion that it was to make bread. Hastorf notes why beer has stuck around for so long:

"It's pretty darn easy to make. When people started harnessing fire and cooking, they probably started making beer.

So look on the bright side - if you ever find yourself stranded somewhere in human history, there's an excellent chance that you'll be able to get good and drunk.