We’ve all had one of those days, when the clock seems frozen in time and the workday drags on, and on, and on. Eight hours can feel like a lifetime, the minutes crawling by, your mood souring by the second.

Now imagine how much worse you’d feel if you had been standing on a hard factory floor for eight hours already and were staring down two more hours, or four, or even more than that? And what if you were pulling those kind of interminable days six times a week—or seven? That’s what a typical day used to be like for the typical worker in an American city, who would struggle through 12-plus-hour shifts at a factory, slaughterhouse, cotton mill, or garment shop until they could trudge home and collapse for a few hours before waking up and doing it all over again.

The eight-hour day and the two-day weekend to which we’ve become so accustomed were not always a given. For many years, they were little more than a pipe dream, the kind of outlandish notions that anarchists, socialists, and trade unionists whispered about at clandestine meetings (and shouted about in beer halls). The idea of having two whole days off per week to rest and spend time with family once seemed like an unimaginable luxury to the toiling class, as out of reach as a $15 minimum wage (or the idea of a standard minimum wage at all). The fight for the eight-hour workday once captivated the American political imagination much like ambitious, potentially transformative policy proposals like Medicare for All and the Green New Deal have become rallying cries for the working class.

This all goes back to the Industrial Revolution, a period between 1750 and 1900 that saw the United States, the United Kingdom, and a number of other European countries embark on a rapid shift away from an economic system built around agriculture and hand-crafted goods and toward industrial manufacturing. At first, this primarily impacted the Northeast and Midwest. It took longer for industrialization to take hold in the South and West, where agriculture was king and the greedy railroad barons who controlled farmers’ access to the market kept freight prices high.

That meant that scores of people moved away from the countryside and funneled into expanding cities like Chicago and New York City to find work. Those cities soon became crowded and dirty, and the workers themselves suffered due to the low wages, squalid living conditions, and countless factories belching smoke into the sky that came to characterize turn-of-the-century urban life.

It also fundamentally changed the nature of labor. Skilled craftsmen were rendered irrelevant by an influx of cheap, mass-produced goods and had to work for capitalist bosses to survive. Child labor also thrived, with kids pulling 12-hour days under dangerous conditions. Many fell victim to disease and injury, or were killed on the job. Things weren’t much better for adults, and workers began organizing under the idea that, basically, something had to give.

Winning the eight-hour workday was less of a pitched battle than a fitful, century-long slog. Our current model was preceded by an earlier fight for a 10-hour workday, which took root in Boston in 1825 and spread throughout the Northeast via a series of strikes. That struggle carried through into the 1850s and led to several states establishing a 10-hour workday (which was difficult to enforce properly and did little to change the actual hours of labor for most workers. Soon after, though, talk turned to an even shorter workday, one that became a holy grail of sorts for those dedicated to securing it: the eight-hour workday.