It is 2012 in Washington state, where voters are facing an initiative to legalize recreational marijuana. The airwaves reverberate with ads on both sides. At a glance, it's not always obvious which side is which. One pro-legalization ad features an authoritative man who introduces himself as "the former chief federal prosecutor." Initiative 502, he says, "brings marijuana under tight regulatory control." In another 30-second spot, a "Washington mom" looks up from her newspaper and coffee to declare that she does not like marijuana personally, but "what if we regulate it? Have background checks for retailers? Stiff penalties for selling to minors?"

In Alaska's 2014 legalization campaign, a police officer intones: "Passing Ballot Measure 2 will allow law enforcement to focus on serious issues in Alaska." Nevada's spots in 2016 urge "voting Yes on 2 to regulate marijuana."

You don't need a Ph.D. to see the pattern. "It was about control," says Anna Greenberg, a pollster with the Washington, D.C., firm of Greenberg Quinlan Rosner, who worked on the legalization campaign in Washington. "It was almost hostile to marijuana, as opposed to celebrating it and making it legal."

In 2012, at the same time initiatives in two states legalized recreational cannabis, ballot campaigns in four states legalized same-sex-marriage. Some of the messaging might have been mistaken for a family-values campaign. In a Washington TV ad, a state senator talks about love, commitment, "everything that makes for a good marriage." In a Minnesota spot, an elderly couple extol their 59-year marriage. "Why shouldn't gay people be allowed to enjoy the same happiness and the love that we've enjoyed through our lifetime?" asks the craggy-faced husband, whose emblazoned Marine Corps cap proclaims his military service in Korea.

This, it appears, is how the cause of freedom wins in today's America: by not talking about freedom. As Reason senior editor and drug policy expert Jacob Sullum tells me, "To some extent, you have to talk like a statist."

Today can seem a bleak time for libertarian causes. Republicans are in thrall to populist nationalism. Democrats are flirting with socialism. Deficits, government spending, border barriers, and tariffs are rising. Yet the most significant social policy breakthroughs of this century—the legalization of recreational marijuana and the nationwide recognition of same-sex marriage—were in the direction of liberalization. Both were causes supported by libertarians decades before the public took them seriously. (Impressively, Reason carried an editorial in 1975 supporting gay marriage. Even more impressively, the following year the Libertarian Party endorsed the idea. As for marijuana legalization, Reason has been on that case since at least 1969.) Both represented dramatic reversals of long-established public opinion; both broke through at the same moment.

Structurally, the two issues are different in too many ways to count. But their trajectories in the opinion polls have tracked closely. Like birds and bats, they underwent convergent evolution on their way to liftoff. Compelled by the political and cultural environment to make similar choices, they took parallel routes to legalization—and those routes reveal a lot about how liberalization happens in a country that has more libertarian sympathies than libertarian voters.

Mission: Impossible

In the mid-1990s, when I began my own public advocacy of same-sex marriage, it seemed a quixotic crusade. In 1993, a court in Hawaii cracked open the door for marriage equality; Congress and the (Democratic) president responded with a pre-emptive slap-down, the federal Defense of Marriage Act. A movement to write gay-marriage bans into the U.S. and state constitutions swept the country, enjoying crushing success. The cause seemed so hopeless that my father urged me to drop it, lest people think I was a nut—a credible worry at the time.

I was not involved in the marijuana debate—or, I should say, the marijuana issue, because, as with same-sex marriage, there really was no debate. The National Organization for the Reform of Marijuana Laws (NORML) had been founded in 1970 and made some headway in the following decade, but it crashed against the reef of "Just Say No" in the 1980s.

Still, had we compared notes, advocates for both issues would have observed similarities. Gay and lesbian people and marijuana users were social outsiders, considered deviant by mainstream opinion. "Both groups were not held in high regard by mainstream America," says Keith Stroup, NORML's founder. The reforms they advocated threatened to undermine the social order and cause a cascade of uncontrollable consequences, or so the public feared.

With no precedent to point to, advocates had no real-world counter to predictions of social chaos and doom. Both issues had zero mainstream political support. Gay marriage advocates could not get bills introduced in state legislatures, let alone enacted (an often overlooked reason for their sometimes-criticized recourse to the courts). Attempts by centrists to float compromises—decriminalization for marijuana, civil unions for marriage—were deemed too weak by reformers and too strong by resisters.

Below the surface, though, even when not much seemed to be happening aboveground, change was happening. With the benefit of hindsight, it is easier to see how.

It's the Morality, Stupid

Begin with a fact that seems unlikely ever to change: In America, libertarian support for social change is not enough. Marijuana aficionados, gays and lesbians, and cultural libertarians between them could not push their public support above about 25 percent. To win, both issues needed to find unnatural allies among communities with quite different interests and values.

That required trial and error and, especially, patience. "We knew we weren't going to persuade somebody immediately," says Marc Solomon, a veteran of the marriage fight and the author of Winning Marriage: The Inside Story of How Same-Sex Couples Took on the Politicians and Pundits—and Won. "We wanted to take people on a journey."

Stroup concurs: "For these difficult social issues, I don't think there are any shortcuts. You have to take the time to re-educate the American public."

Eventually, both movements succeeded with policy arguments that appealed to voters' slow-thinking, evidence-based reasoning circuits. Legal marijuana would provide tax revenues, weaken drug cartels, improve law-enforcement priorities; same-sex marriage would offer stability for gay couples, protect their children, ease medical decisions. But those consequentialist arguments acted more as clinchers than as prime movers—and sometimes they backfired, as when messaging about same-sex couples' need for spousal benefits perversely bolstered the notion that gay couples marry for money instead of love and commitment.

Over time, it became evident that marijuana and marriage, like most political issues today, were primarily about morals and values, and only secondarily about policy trade-offs. For marriage equality, the real hang-up was the majority's belief that same-sex relations, in or out of marriage, are morally wrong, something most Americans told Gallup they believed until 2010. Attitudes toward same-sex marriage closely tracked with attitudes toward same-sex morality. People regarded support for legalization as a form of personal approval.

Much the same is true for marijuana. In 2006, most Americans told Pew Research that using marijuana was morally wrong. That figure had declined to only a third in 2013, a crucial breakthrough, given that most Americans do not distinguish clearly between public policy and personal morality. "As long as they saw marijuana as a threat to the safety of their children, we couldn't win," Stroup says. "As long as it was considered sinful or bad conduct or immoral, they were not about to" support legalization.

In other words, it was not enough to show that getting married or high is my right; activists needed to show that it is right—or at least not wrong.

This battle, seemingly unwinnable a few years ago, has now been won. In 2018, according to Gallup, 67 percent of Americans say that gay or lesbian relations are morally acceptable, and 65 percent say the same of smoking marijuana.

Changing the Frame

How was this sea change in public morality achieved? Partly as a result of natural generational changes, and partly as a result of growing public familiarity with marijuana use and same-sex couples. But partly, also, because of shrewd strategic choices.

In the 1960s, Frank Kameny, a pioneering gay-rights activist, coined the slogan "Gay Is Good!" He considered the coinage one of his proudest achievements, because he realized that appeals against discrimination could not, by themselves, overcome the country's moral qualms about homosexuality.

To his disappointment, Kameny's slogan never caught on. It was premature. Americans at the time saw homosexuality as strange and sinister. Changing that attitude required a decadeslong slog through the AIDS crisis, the marriage movement, and the campaign to increase visibility by encouraging people to come out. Crucially, the share of Americans who reported having gay and lesbian friends, relatives, and co-workers rose, reaching a majority in the early 2000s (according to Gallup) and hitting 75 percent in 2013—an astonishing development for a gay man of my generation, to whom the closet had for so long seemed an immutable prison.

Advocates of marijuana legalization had a harder problem: How could they make a moral case for toking? Certainly not by chanting, "We're here, we're high, get used to it!" The answer, hit upon by activists in the 1990s: medical use. "It was medical marijuana or nothing," recalls Allen St. Pierre, a former executive director of NORML. Here, potentially, was a story about helping cancer and AIDS patients eat, and about preventing seizures in children for whom traditional medications had failed. California's approval, in 1996, of an initiative legalizing doctor-recommended marijuana proved seminal; four more states followed in 1998, and in the 2000s the trickle became a flood. (As of mid-2018, 31 states and the District of Columbia had medical-use laws.) California's disorderly medical-use system was prone to abuse, but it didn't matter. That was the price of helping suffering kids. "When marijuana began to be considered a helpful medicine for hundreds of thousands of patients around the country, that's when we really began to see our political support pick up and move forward," says Stroup.

Today can seem a bleak time for libertarian causes. Yet the two most significant social policy breakthroughs of this century happened in the direction of liberalization.

Changing the moral frame by destigmatizing marijuana and homosexuality was a necessary condition for change. It prepared the public to listen to pragmatic arguments about the harms of prohibition and the benefits of legalization, but those arguments still needed to be advanced in a climate of intense skepticism. Swing voters, people like well-educated suburban parents, had been conditioned to believe that legal pot and Adam-weds-Steve were radical notions and slippery slopes. For both movements, America's unusual governmental structure provided the opening.

The Federalism Gap

Historically, marriage policies in the U.S. were made by the states. Marijuana policy has been set in Washington since 1937, but the federal government has nowhere near enough cops and jails to enforce its drug laws without cooperation from state and local police and politicians. Progress at the state level, therefore, was possible.

Public opinion on these issues also displayed an interesting wrinkle. Many people who opposed legalization of marijuana or same-sex marriage nonetheless opposed federal pre-emption of states' choices, even if the states favored legalization. Conservatives, in particular, wanted the federal government to butt out. Writing in 2013, E.J. Dionne Jr. and William A. Galston of the Brookings Institution noted: "The gap among Republicans between the proportion supporting [marijuana] legalization and the proportion who nonetheless want the federal government to stand down in the face of state legalization decisions is 20 percentage points." Similarly, many gay-marriage opponents on the right were against a federal constitutional amendment to ban it.

This willingness to let states experiment—call it the federalism gap—provided a critical opportunity. As medical-use laws spread, they became part of the status quo and suggested to the persuadable that maybe the harms of cannabis had been overhyped. After 2012, when Colorado and Washington legalized recreational marijuana in open defiance of federal law, the sky did not fall. As the credibility of anti-marijuana hyperbole crumbled, drug warriors lost their most reliable weapon. "When you take those allegations out of the quiver, there's not a lot they can say," says Stroup.

To drive the point home, legalization advocates hammered on a point that even many skeptics agreed had merit: Marijuana is safer than alcohol. Beginning in the mid-2000s, advocates took up the rallying cry that marijuana should be regulated like alcohol. The strategy, says Mason Tvert, who co-founded the group Safer Alternatives For Enjoyable Recreation, was not uncontroversial. Some activists were reluctant to line up behind government paternalism or were wary of provoking the alcohol industry. But it proved effective.

"You had to win people who don't like marijuana," says Greenberg, the pollster. Audiences who didn't want to hear "Legalize pot!" were willing to consider "Regulate pot!"

Those dynamics were even more dramatic with same-sex marriage. In 2004, Massachusetts OKed it. The result was a wave of setbacks for gay-rights supporters as voters across the country enacted dozens of state-level bans. Yet in Massachusetts, nothing terrible happened. In fact, nothing noticeable happened, except that gay couples got married.

The idea that allowing gay couples to marry would harm straight couples had never been sturdy. The experience with marriage in Massachusetts, and with marriage-like civil unions in other places, confirmed the doubts. Without morality or harm on their side, legalization opponents were at sea.

To win, however, legalizers still needed one more element. "It's hearing from people you know and trust," says Tvert—nonactivists, or what Solomon calls the "non-usual suspects."

The moveable middle did not want to hear from movement veterans. They wanted to hear from authority figures and regular Americans like themselves. That was why ad campaigns for marijuana legalization took care to foreground moms, cops, and prosecutors, many of whom began by averring that they personally did not like marijuana. And it was why ad campaigns for same-sex marriage in Maryland, Minnesota, and Washington state in 2012 often featured parents, neighbors, working-class folks, and military veterans.

For many gay marriage advocates, spotlighting straights in a gay-rights campaign seemed a demeaning step back toward invisibility. But tests with focus groups found the public to be consistently squeamish about depictions of same-sex couples—what P.R. pros called the ick factor. Marriage-equality advocates had run campaigns urging voters not to hate and discriminate, a negative, accusatory message that fell short everywhere it was tried.

In 2008, the movement's catastrophic loss in California—the passage of Proposition 8, an initiative banning gay marriage in the state—finally forced a reckoning, then a recalibration. "Instead of talking about rights," says Cato Institute senior fellow Walter Olson, who worked on the Maryland marriage campaign in 2012, "they talked about family and connectedness and caring about each other. Instead of putting the gay person at the center, they focused brilliantly on the other members of the family. It would be grandpa. It would be mom or dad." Those messages, he says, "reached people where the talk of 'We have rights and you'd better respect them' had failed."

And so, on Election Day 2012, when the voters spoke, they made recreational marijuana legal in two states and same-sex marriage legal in four. As of mid-2018, according to the National Conference of State Legislatures, recreational cannabis was legal in nine states and the District of Columbia. Although marijuana liberalization remains a work in progress, the political and cultural fundamentals have shifted such that there is no turning back. And same-sex marriage, thanks to the 2015 Supreme Court decision Obergefell v. Hodges, is legal nationwide.

Only Failure Succeeds

For those seeking liberalizing social breakthroughs in the face of abiding public skepticism and official hostility, what is to be learned from these parallel stories? Perhaps quite a bit.

First, the breakthroughs of 2012 appeared sudden, and in a narrow sense they were. But they could not have happened without decades of groundwork and the convergence of multiple strategic elements. There is no magic bullet. You need to be persistent in the face of apparent hopelessness and get a variety of settings right. That requires perseverance, flexibility, and pragmatism. Those who are unwilling to toil at hard political labor or who insist on purist messaging need not apply.

Second, all hard political issues are in some sense moral issues. They touch on personal identity and public morality, things that arguments about policy, money, and even harm cannot reach. Historically, American libertarians have been skilled at appeals to reason. But the neurons they need to excite lie deeper in the brain.

That is why research on the net-positive effects of immigration misses the point. As long as the public believes that immigrants are a threat to law and order or undermine the country's social fabric, ears will be shut. Opening them requires telling moral stories, not reeling off crime statistics. Whatever his shortcomings as a messenger, Jeb Bush was gesturing in the right direction when he said that many illegal immigrants come as an act of love.

Third, and consequently, freedom is not enough. Appeals grounded in the right to make lifestyle choices and the right to be free of discrimination were mainly persuasive to the audience that least needed persuading. To win, libertarians will need to sound, well, less libertarian. As when marijuana activists foregrounded government regulation and marriage activists foregrounded straight messengers, campaigners need to learn to sideline their own instincts and speak in alien tongues.

Fourth, the states are powerful and often underutilized change agents. By allowing for policy experimentation in the places where the public is most comfortable with it, they reduce the fear factor and circumvent conflict. It was easy for opponents to argue that gay marriage and legal marijuana were too risky to try everywhere. Much harder was arguing they should never be tried anywhere. Arguments for state-level reform and experimentation deserve more strategic attention than they typically receive.

Immigration reform, for instance, has come to seem intractable at the federal level. However, there may be more room to maneuver by delegating authority to the states—for example, with state-sponsored visas, an idea that has the support of elected officials and legislatures in multiple states, some Republican members of Congress, and the Cato Institute. To tamp down political conflict, push it down to lower levels of government.

Finally, nothing succeeds like failure. Both movements were defeated again and again but learned from their mistakes. They had to see their own messaging instincts lose repeatedly before they learned how to steal the other side's rhetorical clothing. Opponents of reform, by contrast, proved unable to adapt. Accustomed to winning effortlessly, they became intellectually lazy and politically complacent.

From experience, I can attest to the pain of losing on marriage ballot initiatives in every one of the 31 states that floated them prior to 2012. It was perhaps the most comprehensive political shellacking in American history. Yet those same defeats catalyzed the strategic reboot that finally broke through six years ago. True, President Barack Obama's change of heart that year shifted crucial African-American votes. True, more people than ever had openly gay friends and relatives. True, many other stars had to line up for us to succeed. In the end, however, all of what went right would not have been enough if so much had not first gone wrong.