Sour beers have become insanely popular in the last few years. A decade ago it seemed like hardly anyone knew what they were and almost no one was brewing them — today most breweries offer a sour option. Some breweries only serve sour beers.

They’re everywhere these days and even a few years ago, they weren’t. But sour beers aren’t new even though they may have earned newfound popularity in America. They’ve been around for a long time — in fact, sour beers pre-date all other forms of beer. They were the first beer known to man.

But what gives them their sour flavor?

Simply put: yeast and bacteria. But it’s far more complicated than that.

See, thousands of years ago when beer was first being brewed, the sanitation guidelines weren’t the exactly same as they are today. Wild yeast and bacteria would find their way into the starter accidentally — either through the wood of the barrels or from the open air cooling of the wort. As those microbes began to ferment together with the other ingredients they began to distinctly change the flavor of the beer.

Today, brewers intentionally and carefully incorporate specific yeasts and bacteria into their brew, in order to cultivate that same sour flavor. Most commonly, Lactobacillu, Pediococcus and Brettanomyces, are used to achieve sourness in modern beer. Those microbes produce ethanols, esters and acids which is where the tart magic really comes from.

"These organic acids give sour beers a lot of their flavor, and the balance of organic acids produces very different types of sour beer," says Teresa L. Longin, Ph.D., a principal investigator researching sour beers for a study from the University of Redlands.

That’s why diffrent styles of sour beer offer such wildly different sour flavors: American wild ales, Berliner weisse, flanders red ales, gose’s, lambics and oud bruins all have totally unique profiles from one another; and even among those styles, you’ll find variances in sourness and types of sour.

"It can be more like balsamic vinegar, which has a sweet/sour flavor, or it can be 'puckery' sour.” Says Longin. “So the mix of organic acids is really important for understanding the flavor profile."

Her study aims to really flesh out the nuances of those organic acids, so that brewers have even better control over the flavors of their sour beers.

"Scientists are very interested in beer and especially sours because they are such complicated systems," says Longin. "There have been several prior studies of the components in finished sour beers. What makes our study different is that we've been able to get samples of beer in progress from many different batches."

So, soon we may know even more about these tart libations and the source of their unique flavors. After 6,000 years we might finally have these strange brews figured out.