Besides nothing, Seinfeld was a show about coffee. In nearly every episode of the ‘90s sitcom, Jerry and the gang can be seen at Monk’s Cafe, huddled over a warm cup of joe, working through Elaine’s problems with her boss J. Peterman, or George's tangle of lies. Jerry’s most recent web series riffs on a similar idea, in which he uses comedy as an excuse to drink coffee with other comedians. The man’s life is so affected by the power of brown brew that at one point, he actually called into NPR, just to talk about coffee. “We want to do a lot of stuff. We're not in great shape. We didn't get a good night's sleep. We're a little depressed,” he said then. “Coffee solves all these problems in one delightful little cup.”

Since man first roasted, grinded, and poured some near-boiling water on the coffee bean, he, like Jerry, has been mystified by the black elixir it creates. That some form of coffee culture can be found in nearly every corner of this planet, from Japan to Ecuador, is no small testament to the influence this drink has had on our lives—a social and economic force that has connected countries, caffeinated cultures (and countercultures), created entire markets, and started conversations, like those in Monk’s, for over 600 years now.

So how did the entire world end up sharing this sacred stimulant? To answer that question, we turned to author Mark Pendergrast, whose authoritative history of coffee, Uncommon Grounds: The History of Coffee and How It Transformed Our World, explains how coffee eventually grew into the second most valuable commodity on Earth. Today, we find ourselves in the “third wave” of coffee consumption (we’ll explain the first two later), with seemingly endless options. But according to Pendergrast, that piping hot cup of java you just drank from your Folgers can, Starbucks, or local micro-roaster is the centuries-old culmination of accidents, luck, innovation, and a few good people that really loved coffee.

Here we break down that history and explain how coffee became a way of life.

Early Roots and Discovery

Image via Max Schieble

Historians debate where and when coffee was first created, and by whom, but through his own research, Pendergrast found that nomadic tribes may have been using the coffee plant itself as an old-world caffeine pill, tea, and wine since ancient times. Around the early 1400s, however, a major breakthrough occurred in Ethiopia. “My theory is that someone [by accident] threw the seeds into the fire while they were boiling water, and they liked the smell, which really quite enticing,” says Pendergrast. “And then maybe threw it in the hot water to see if it was right.”

At any rate, people began growing coffee specifically to drink and sell by the early 1500s. Eventually, the cash crop found its way across the Red Sea to Yemen, where demand began to grow as major markets rose in areas like the Yemeni port city of Mocha. It didn’t take long for competition to follow. Throughout the 1500s, the Ottoman Empire conquered what consisted of the Arab world, absorbing the coffee producers of the region as a result. In an attempt to monopolize the market, the Ottomans hard-boiled the seeds before they were exported so others couldn’t cultivate them. But in the early 1600s, an Indian migrant named Baba Budan smuggled out seven seeds in his belt, bringing coffee back to India. This small act of defiance allowed for coffee to spread to other parts of the globe.

The Rise of Coffee Culture

Image via Max Schieble

Since the day it was first brewed, the act of drinking coffee with friends and family has felt natural to every creed or color. And so, from the Ethiopian coffee ceremony to the Turkish coffee house, cultures across the world wove in their own traditions to celebrate the almost-holy social sanctity of the drink.

As a result of this communion, paranoid tyrants saw coffee as a threat to their authority. In Mecca, which was home to some of the first coffeehouses in the world, rulers like Khair-Beg, the city’s governor, outlawed the drink by religious decree and banned coffee houses in 1511, citing that citizens were writing satirical verses of him there. By then, coffee houses and cafes had grown into dens of political and social upheaval, where intellectuals, revolutionaries, and dissidents could discuss their caffeinated ideas until dawn. So soon enough, they became targets.

This sort of persecution persisted in Europe, but it would be quickly outpaced by profit, as the coffee trade accelerated with each passing year. It didn’t take long for the Dutch to get their hands on coffee trees in India and bring them back to the Netherlands, introducing Europe to a drink that would later come to define the continent. Coffee colonies were formed in Java and the modern-day Sri Lanka. “That became a big industry by the late 1600s,” says Pendergrast. “Mocha, which is a port in Yemen, and Java would become famous as two of the places that coffee came from.”

Mass Production in a New World

Image via Max Schieble

In 1723, the Dutch gave a fertile coffee sapling to Gabriel de Clieu, a French naval officer, who brought it across the Atlantic—protecting it against pirates and the cold—to the Caribbean island of Martinique. This is said to be coffee’s first foothold in the New World. Now, nearly 300 years later, Pendergrast think there’s a pretty good chance that nearly every coffee plant in the Western Hemisphere comes from that one small sapling.

Coffee would naturally find its way to the perfect climates of Central and South America, where it soon exploded, economically, into one of the most valuable industries on the planet. By the turn of the 19th century, the Industrial Revolution introduced cheap canned coffee, like Folgers and Maxwell House, into the average American household, equalizing access. This is what’s known as the “first wave” of coffee—when it could be brewed by anyone, anytime.

But the effects of industrialized capitalism introduced to the coffee market incurred risk. “This boom-bust cycle began, where too much coffee would cause prices to plummet, and people stopped growing it. And then, the cycle would happen again,” he said. “That's continued to this day, although there's such a demand for coffee now that some people think that there won't be another bust cycle. But I assure you there will be.”

The Starbucks Empire

Image via Max Schieble

One of the most major consequential events for coffee came in 1971, when the first Starbucks opened in Seattle, launching what would become by the turn of the millennium the largest coffee franchise in the world. According to Pendergrast, Starbucks CEO, Howard Schultz, is an ardent apostle of sociologist Ray Oldenburg's famous book, The Great Good Place, which posits that humans need a third place, other than the home and the office, to unwind. In the 1950s, it was the soda fountain. But in the modern era, the coffee shop took its place. “Schultz recognized that, and he said, 'We're gonna make the Starbucks experience as important as the coffee itself, by making it a welcome and hip place for people to meet.’”

Not only did Starbucks commercialize the concept of drinking coffee, but they also expanded palates of coffee drinkers worldwide, which had a cascading effect on other chains—like McDonald’s, Dunkin’ Donuts, etc.—who have since rushed to add gourmet options to their menus. This period is what's known as the "second wave”—an era when people started to care what their coffee order was; when, as one coffee shop owner once told me, people in the middle of nowhere learned what a latte was.

The Cult of Singularity

Image via Max Schieble

Micro-roasters first appeared on the coffee scene in the 1970s as as a backlash to the Folgers of the world. But as of late, they've ballooned into a force to be reckoned with, due in large part to the heightened consciousness surrounding coffee. And truth be told, they have Starbucks to thank for that.

Today, the coffee shops that were once thought to be fighting the system have become part of the system. Specialty shops have gained increasing access to the taste buds of what is now a highly sophisticated market, whose consumers not only care about what their coffee is, but where and how it was made, be it with fair trade or sustainable practices. And the competition is starting to notice: Starbucks has opened up special 'reserve' roasters and now sells single-origin blends, while stalwarts like Folgers are introducing new gourmet tastes and K-cups.

Overseas exchange has grown as a result: American coffee shops like Blue Bottle have been inspired by the Japanese kissaten, while Swedish cafes have interrupted fika (or the coffee break) for more grab-and-go options. And since the market has become so saturated with cafes, chains, and DIY products, competition almost seems futile. Instead, a sort of global hegemony has arisen, where institutions are adopting and incorporating whatever they can from each other.

This is where we find ourselves now, in the "third wave" of coffee, but it really feels like a moment more so of singularity—when you can get literally any type of coffee, at all times, a dream come true to those original pioneers of coffee.