When police raided gay bars back in the day, they expected the patrons to scatter. But one hot Friday night 50 years ago this week, at the Stonewall Inn, no one was going anywhere. Gay, lesbian, bisexual, transgender, old, young — they booed and jeered as the cops walked their prey out of the bar. Kids across the street started throwing pennies, then bricks. Finally, the riot squad was called in, and even they couldn't clear the streets.

Martin Boyce remembers sitting on his stoop the next day, exhausted from the melee. "My God, we're going to pay so desperately for this," he thought. But that's not what happened.

"The next day we were there again," he says. "We had had enough. Every queen in that riot changed."

On June 28, 1969, what happened at Greenwich Village's Stonewall Inn became "Stonewall," the legendary uprising against homophobic abuse.

The telling and retelling of the Stonewall story makes it seem like Martin Luther King Jr.'s famous arc of the moral universe isn't long — as he claimed — but explosively short. Much of the 50th anniversary coverage of the uprising has marveled at how quickly gays won their civil rights, at how everything changed in one night when, in Boyce's words, "We had had enough."

But nothing about Stonewall was sudden. The homophobia was an age-old story, and the riot was the product of activism that had been building for decades. King's quote is correct: History's arc traces a very long line. It only bends toward justice because so many activists over so many years hammer relentlessly upon it.

The movement that erupted into a riot at Stonewall in 1969 dates back to the early 1900s, when LGBTQ people began to migrate to cities. Abuse and harassment followed them.

The repeal of Prohibition in 1933 empowered states to license liquor, and with licensing came the requirement that bars must be "orderly," which gave authorities cover for harassing gays even in their own establishments. In the 1940s, the Red Scare became a "Lavender Scare," as investigators applied the "subversive" label to gay men and lesbian women working for the government. The longest surviving gay resistance organization, the Mattachine Society, was founded, alongside the lesbian Daughters of Bilitis, in the early 1950s; it all but unraveled under the pressure of government scrutiny.

But in 1957, the government made a terrible mistake when it fired physicist Franklin "Frank" Kameny for being gay. Instead of going quietly, he sued. Kameny lost (the Supreme Court would not consider discrimination based on sexual orientation unconstitutional until 1996), but his fight revived the Mattachine Society. Kameny organized early gay rights protests at the White House, the Pentagon, the United Nations.

By 1969, gays who had honed their activism protesting the Vietnam War had had enough maltreatment from their straight lefty brothers. They came out and applied their politics to a new front. One of them, Carl Wittman, once a leader in Students for a Democratic Society, wrote a manifesto calling for gays to openly embrace their identity: "Stop mimicking straights, stop censoring ourselves. We have to learn that our loving each other is a good thing, not an unfortunate thing." With exquisite timing, two other SDS alumni, Bill Katzenberg and John O'Brien, scheduled a "homosexual discussion group" at Alternate U., a free counterculture school in Greenwich Village for July 1969. It would go from five pre-Stonewall registrants to 40, post-Stonewall.

When the first stone flew at the Stonewall Inn, an architecture for the movement was already in place. Before Stonewall, smaller uprisings in San Francisco and Los Angeles galvanized individuals. After Stonewall, there were meetings.

Within days, radical members of the New York Mattachine Society forced its conservative president, Dick Leitsch, to convene the group, where lesbian activist Martha Shelley stood up and invited everyone to a demonstration protesting police abuse. She soon dubbed the protest planning committee the Gay Liberation Front. Meanwhile, the Alternate U. group set an agenda and a meeting schedule and adopted the same rubric. The game was on, or more appropriately, it was continuing.

We can see a corollary to the Stonewall milestone in another explosive cultural moment. In the course of 10 days in early October 2017, seemingly out of nowhere, the New York Times and the New Yorker both exposed Harvey Weinstein's epic sexual abuse and harassment history. Then actress Alyssa Milano shared a message: "If you've been sexually harassed or assaulted, write 'me too' as a reply to this tweet." Overnight, #MeToo (originated by black activist Tarana Burke in 2011) echoed 55,000 times.

Presto, change-o, right? Not really.

Way back in 1974, Paulette Barnes, a brave clerk at the Environmental Protection Agency, sued a boss who had given her a choice: sex with him or lose her job. Happily, a brilliant law student, Catharine MacKinnon, was laying the theoretical groundwork to establish sexual harassment as sex discrimination — a civil-rights offense. Barnes won on appeal, and MacKinnon's theory became law. That wasn't enough to protect Anita Hill or to make Monica Lewinsky a purely sympathetic figure. It would take another 2½ decades, when a cadre of young feminists empowered by the internet — Andi Zeisler, Jessica Valenti, Rebecca Traister — began to insist on another "we've had enough" moment. Out of their ranks came the change in mind-set, and some of the mainstream journalists who would break the Weinstein story.

"Stonewall" conveniently marks a movement that was a century in the making and that would go on to be honed by assassination (Harvey Milk), a deadly epidemic (AIDS) and a brilliantly strategic same-sex marriage campaign. The Weinstein revelations likewise mark a milestone for women, but to say it launched a movement isn't exactly accurate. Gay rights and women's rights don't turn in an instant, no matter how galvanizing. The revolution is incremental. It takes agonizing courage, a dedicated fight, herculean perseverance. It takes time.

Linda Hirshman is the author of "Reckoning: The Epic Battle Against Sexual Abuse and Harassment" and "Victory: The Triumphant Gay Revolution." She wrote this article for the Los Angeles Times.