Ever wonder how that homebrewed cup of joe (or fancy double caramel latte from the coffee shop) became a morning ritual for millions of people?

It all began with goats, at least according to a widely touted — and delightfully charming — legend. As the story goes, a young goat herder named Kaldi first discovered the energizing effects of coffee in Ethiopia over a millennium ago after he noticed his goats “dancing” one day. Intrigued by their out-of-character cavorting, Kaldi soon connected the dots: The goats’ hyperactivity increased every time they nibbled on bright red berries from nearby shrubs growing in the highlands. He tried a few for himself and was soon prancing and pirouetting just like his goats.

Apparently, a passing Sufi monk from a nearby monastery observed Kaldi and his frolicking herd. He asked Kaldi to share his stimulating secret, and decided the berries might just help him stay awake during long evening prayers. In other versions of the legend Kaldi visited the abbot of a local monastery to report his electrifying discovery. Whichever way it happened, the monk started drying the seeds he found inside the berries (“coffee beans” to us), then ground and boiled them to make a beverage. He shared the prayer-enhancing brew with his fellow monks, and word of its invigorating powers soon spread throughout the region.

Watch this video to learn more about Kaldi, his caffeinated goats and the history of coffee.

Global blend

Plausible as this legend might be, there’s no way to actually verify it. Needless to say, whatever first led to the discovery of coffee — which most agree did happen in Ethiopia — it’s enjoyed a meteoric rise over the last 1,000 years.

By the 15th century, coffee was being cultivated in Yemen and soon spread to Turkey, Egypt, Persia and elsewhere throughout the Arab world. Coffee houses became important gathering places in society — not unlike Starbucks and other connoisseur coffee shops we frequent today.

European merchants traveling through the region in the 17th century were so taken with the strange dark brew that they introduced it back home. Despite some controversy that Satan had a hand in creating the stimulating drink, Europeans quickly embraced it and coffee houses took hold there too. As coffee began to replace beer and wine as the breakfast drink of choice, cultivation spread beyond the Middle East to tropical regions throughout the world to meet rising demand.

cherry-like fruit of coffee plant contains beans Each cherry-like fruit of the coffee plant usually contains two seeds — better known to us as 'coffee beans.' (Photo: Larry Jacobsen/flickr)

Not surprisingly coffee also made its way to the New World in the 1600s with arriving Europeans. Tea remained the national favorite until 1773, when colonists famously rebelled against King George III’s high tea tax for the Boston Tea Party. The switch to coffee was solidified.

With New World demand on the rise, coffee cultivation spread to the Caribbean and Central and South America.

Continuing coffee revolution

The rest, as they say, is history. From the invention of instant coffee, decaf and home espresso machines to the rise of Starbucks and now artisanal roast-to-order brews and cafes, coffee culture has never stopped thriving. Today, this beloved brew is one of the most consumed beverages in the world — a $225 billion economic force just in the United States alone, according to the National Coffee Association of the USA. And as the Wall Street Journal reports, worldwide demand is expected to rise 25 percent in the next five years.

caffeine lovers have gathered in coffee shops for centuries Caffeine lovers have gathered in coffee shops for centuries to relax, exchange ideas and sip their favorite brews. (Photo: Brian Bilek/flickr)

Not bad for a goat-inspired concoction born long ago in the mountains of Ethiopia.

So next time you grab your farm-to-table, single-origin blend from the barista and savor its rich, small-batch flavor with friends, don’t forget to give a nod to Kaldi and his dancing herd.