For decades, the war on drugs has been characterized by “stop and frisk,” militarized raids on people’s homes, and prison sentences that can span decades or lifetimes.

This was all under the encouragement of the president. Richard Nixon declared the war on drugs. Ronald Reagan escalated the war with “tough on crime” mandatory minimum sentences. George H.W. Bush gave his first televised national address on drugs, telling the country that drugs are “the greatest domestic threat facing our nation today” while holding up a bag of seized cocaine. Bill Clinton signed laws that pushed for tougher prison sentences and stripped prison inmates of much of their legal defense rights.

Then came hope and change.

Early in 2016, President Barack Obama began pardoning and otherwise shortening the prison sentences of hundreds of federal inmates. In November, Obama said he would like to treat marijuana “as a public-health issue, the same way we do with cigarettes or alcohol.” And recently, Obama signed a bill last week that will spend $1 billion over two years to combat the growing opioid painkiller and heroin epidemic — all through public health, not criminal justice, programs.

Individually, none of these stories may seem related, and it was easy for them to get lost in the train wreck that was the 2016 election. But all of these stories are part of the same overarching story: The Obama administration really has, slowly but surely, worked to reshape how America fights its war on drugs — to treat drugs more as a public health issue than a punitive criminal justice undertaking.

Based on my conversations with White House officials and advocates over the years, and a look at the administration’s actions, the Obama administration’s shift has been deliberate — a fundamental reshaping in how America deals with drugs.

Much of this has been rhetorical. The Obama administration has made it a point to avoid the term “war on drugs” out of concern that it perpetuates the same old way of dealing with and thinking about drugs. Michael Botticelli, who leads White House Office of National Drug Control Policy (ONDCP) as the “drug czar,” has repeatedly said that “we can’t arrest and incarcerate addiction out of people.” President Obama has echoed the sentiment, suggesting a public health approach makes more sense for drugs.

But there have also been real policy changes attached to the talk. The administration has dramatically increased public health spending for anti-drug efforts, proposing the first drug control budget since President Jimmy Carter in the late 1970s that would spend more on treatment and prevention than law enforcement and interdiction programs in the fight against drugs. He will be the first president in decades to leave office with a smaller federal prison population than the one he inherited, thanks in part to executive efforts to undo harsh sentences against nonviolent drug offenders. And he has looked the other way as states have legalized marijuana, despite his legal ability to crack down on these states and stop the experiment of legalization before it began.

It’s not as much action as drug policy reformers would like. They argue that Obama could have been far more aggressive with pardons and commutations for prisoners. They would have preferred if he came around on pot much earlier, particularly during his first term. And they would like to see the law enforcement side of the war on drugs actually cut back, not just overtaken in terms of spending by new public health efforts; there are still, after all, hundreds of thousands of arrests for marijuana alone each year.

And of course, there’s the real concern that President-elect Donald Trump will undo much of the Obama administration’s progress on these issues. Trump ran on an explicitly “tough on crime” platform. And he appointed Alabama Sen. Jeff Sessions, who once said matter-of-factly that “good people don’t smoke marijuana,” to head the US Department of Justice, which oversees the Drug Enforcement Administration (DEA), the major law enforcement arm of the federal drug war.

Still, when you look at the big picture, it’s clear that Obama has done a lot. It’s fair to say he will leave office as the most progressive president on drugs to date. Whether it’s through his handling of the opioid epidemic or marijuana’s legalization at the state level, Obama and those in his administration have taken an approach to drugs that would have been unimaginable just a decade ago.

Treating the opioid epidemic as a public health issue

The opioid epidemic began as a public health problem, with doctors in the late 1990s through 2010s unscrupulously prescribing droves of opioid painkillers that would go on to hook patients, family members and friends who borrowed the drugs, and those who obtained the drugs illegally from patients through the black market. From there, many of those new drug users would eventually end up seeking out other opioids, like heroin and fentanyl. Over the past two years, the epidemic has led to record numbers of drug overdose deaths — topping the toll of gun violence, car crashes, and even HIV/AIDS during its 1995 peak in America.

The Obama administration did not follow through on this epidemic with the typical “tough on crime” rhetoric that plagued old drug epidemics. Instead, it pushed time and time again for a public health response — not just rhetorically, but in terms of policy as well.

The culmination of these efforts came in December when Obama signed the 21st Century Cures Act into law. The law does some controversial things in terms of speeding up the drug approval process, but it also increased spending on the opioid epidemic by $1 billion. But this money won’t go to more prisons, police officers, and soldiers overseas. It’s instead set to go to public health measures — including more access to addiction treatment and better training for doctors’ prescribing practices.

It’s worth stepping back and emphasizing that it did not have to be like this. A drug epidemic of the current one’s scale could have easily thrown Congress and the White House back into their old “tough on crime” ways. It was a heroin epidemic and widespread drug use in the 1960s that led Nixon to declare his drug war. And it was the crack cocaine epidemic of the ’80s that led Reagan to pass all sorts of harsh anti-drug policies, such as the Anti-Drug Abuse Act of 1986. But the White House and Congress instead pushed a softer approach this time around, focusing on public health not just through this current bill but also the recently passed Comprehensive Addiction and Recovery Act.

A drug epidemic of the current one’s scale could have easily thrown Congress and the White House back into their old “tough on crime” ways

The White House actively signaled its focus on public health with who it put in charge of federal drug policy: Michael Botticelli. As the drug czar, Botticelli oversees the full scope of the federal drug budget. Typically, this role has gone to law enforcement or “tough on crime” figures in the past — people like Gil Kerlikowske and Bill Bennett. And the office, as a result, has focused on cracking down on drugs in very punitive ways by supporting policies like high-profile police raids and incredibly harsh prison sentences.

Botticelli has not only focused on public health issues and addiction in particular for most of his adult career, but he’s a recovering alcoholic himself. And he’s very direct with his views on the drug war, characterizing the “old war on drugs” as a set of “failed policies and failed practices” in interviews.

Advocates say the symbolic shift of Botticelli’s appointment as drug czar is just one of the many ways the Obama administration has helped change the conversation around these issues to a place that’s much more ripe to reform. “It has been very helpful to have the drug czar’s office out there talking about addiction the way they do,” said Michael Collins, a deputy director of the Drug Policy Alliance. “Having [Botticelli] as a spokesperson, having his voice as someone who’s in recovery and someone who knows what addiction is like, is very powerful as well.”

White House officials said this was deliberate: They were always cognizant of the possibility that the current opioid epidemic could lead policymakers back to Reagan-style “tough on crime” policies. So they constantly made sure to emphasize the value of public health initiatives in their messaging.

Pulling away from the war in the war on drugs

“For too long we’ve viewed drug addiction through the lens of criminal justice,” Obama said at a conference in Atlanta earlier this year. “The most important thing to do is reduce demand. And the only way to do that is to provide treatment — to see it as a public health problem and not a criminal problem.”

Obama’s policy proposals backed up this talk. The administration, which through ONDCP oversees the drug control budget that manages federal anti-drug spending, steadily increased spending on public health measures in the drug war while letting the law enforcement side’s funding stagnate. And for fiscal year 2017, the Obama administration proposed a drug control budget that would have been the first since President Jimmy Carter to spend more on treatment and prevention than law enforcement and interdiction.

Congress never approved the budget because it never passed a full budget for the current fiscal year (which runs from October 2016 to September 2017). But White House officials told me that drug control spending for fiscal year 2017 so far looks on track to split 50-50 between the public health side and law enforcement side.

This is a radical reshaping of the typical balance between the “demand” and “supply” sides of the budget.

The supply reduction side is what the drug war is traditionally about — going after drug cartels, drug dealers, and drug users with the threat of criminal punishment, deterring them from trading in drugs and seizing their product in the process. The idea is that by limiting the supply of drugs, prices will go up and a drug habit will be much costlier and harder to maintain. In the past couple decades, particularly since Ronald Reagan amped up the drug war, most federal anti-drug spending focused on this side.

But while this approach has very likely pushed the prices of drugs higher than they would be otherwise, illicit drug prices have still plummeted over the past few decades as illicit drug use has remained roughly the same or gone up. As one example, between 1981 and 2007, the median bulk price of heroin fell by roughly 93 percent. And rates of heroin use generally increased, particularly since the early 2000s.

The demand reduction spending goes to other sorts of programs, mostly focused on preventing and treating drug abuse as a health care issue. The goal is to eliminate demand for drugs by either treating addiction or preventing it — since if there's no demand, there’s going to be no market for illicit drugs. (There’s some controversial stuff on the demand side, like drug courts that force people into treatment that they genuinely might not need — but a bulk of the money goes into treatment programs.)

Public and expert opinion tends to favor the demand reduction side. Polls show that most Americans prefer treating drugs as a public health issue, not a criminal one. And many experts, including the International Narcotics Control Board, have asked for a greater focus on public health policies to curtail demand for drugs.

at least 89 percent of people who met the definition for a drug abuse disorder didn’t get treatment

There’s a good reason for believing this is necessary: According to 2014 federal data, at least 89 percent of people who met the definition for a drug abuse disorder didn’t get treatment. Patients with drug abuse disorders who do seek out and get into treatment also often experience weeks- or months-long waiting periods for that care.

Still, many drug policy reformers argue that the Obama administration’s shift has come far too slowly. For one, it wasn’t until well into Obama’s second term that there was a large increase in spending on the demand side of anti-drug efforts. If the White House had started this work sooner, then perhaps the expanded treatment options that are now in the works could already be up and running. (Of course, this would have needed Congress’s approval — a very big hurdle.)

Meanwhile, the supply side in the drug control budget hasn’t actually been cut. That’s something that advocates would like to see, especially if all drugs are, as they’ve long called for, decriminalized or even legalized. After all, what use would all that anti-drug spending for police and prisons be if drug use is no longer a major crime?

“It’s an important milestone that’s been ticked,” Tom Angell, head of the pro-legalization Marijuana Majority, said of the administration’s more progressive drug control budget. “But it’s also worth pointing out that the small shift that’s been made doesn’t come close to matching the glowing rhetoric that the administration has used over the years to describe its so-called ‘health-focused approach’ to drug policy.”

The Obama administration has pushed back on the idea that they took a while to act. White House officials pointed out to me that the Affordable Care Act (“Obamacare”), one of the administration’s first initiatives, includes protections for patients with drug use disorders, so health insurers have to cover drug treatment as an essential health benefit. And it also expands access to insurance, which helps people pay for treatment. That, officials argued, is a big step forward: People can’t get care if they can’t afford it, and they likely won’t be able to afford it if they don’t have insurance or their insurer doesn’t cover it.

Indeed, studies show that 2.8 million people with drug use disorders would lose access to care if Obamacare were repealed without a replacement.

But that wouldn’t show up in the budget numbers — showing that as big as the shift in the drug control budget is, it can leave out other things that the administration did, sometimes fairly early on.

Pushing for broad criminal justice reform — then executive action

One of Obama’s major targets in the past few years has also been America’s massive prison population. The US is the global leader in incarceration, holding more prisoners — 2.3 million — than any other country in the world and more prisoners per person than any country besides the tiny African island of Seychelles. About 87 percent of that incarceration goes on at the state level, where about half of prisoners are in for violent crimes. But the federal government holds the remaining 13 percent, about half of whom are in for drug crimes.

This level of incarceration is expensive: about $80 billion a year at the local, state, and federal levels. And it’s not very effective at fighting crime: The crime rate has fallen by about half since the 1990s, but criminal justice experts say mass incarceration had little to do with it. A 2015 review of the research by the Brennan Center for Justice, a criminal justice reform group, estimated that more incarceration explained zero to 7 percent of the crime drop since the 1990s, while other researchers estimate it drove 10 to 25 percent of the crime drop since the ’90s. (Other potential contributors to the crime drop include changes in policing strategies and reduced use of cash.)

So Obama moved to peel back mass incarceration, particularly with a focus on undoing and reforming anti-drug laws that impose draconian sentences for nonviolent offenses.

The first big success came with the Fair Sentencing Act of 2010. The bill, which Obama signed into law, reduced the sentencing disparity between powder cocaine and crack cocaine. Although both drugs are pharmacologically similar, the sentencing structure behind them was enormously disparate: You needed to have just 5 grams of crack to end up in prison for five years, compared to a requirement of 500 grams for powder cocaine. There was a big racial disparity, as is true for many drug war policies, behind this difference: Black Americans are more likely to use crack, while white Americans are more likely to use powder cocaine. The law elevated the threshold for crack to 28 grams, closing the gap in sentencing from 100:1 to 18:1.

But in its second term, the White House wanted to go bigger, and it needed Congress to act once again — this time on a more comprehensive criminal justice reform bill.

“We should not be locking up kids or individual users for long stretches of jail time when some of the folks who are writing those laws have probably done the same thing”

As Obama told David Remnick at the New Yorker, “We should not be locking up kids or individual users for long stretches of jail time when some of the folks who are writing those laws have probably done the same thing.” (Obama himself has admitted to using marijuana and cocaine when he was young.)

While the administration waited for Congress, the Justice Department on August 2013 instructed federal prosecutors to charge and lock up fewer low-level drug offenders. This was central to then–Attorney General Eric Holder’s Smart on Crime Initiative, aimed at reducing the federal prison population. While the memo didn’t carry the force of a new law, the administration hoped that a harder, permanent legal change would eventually come through Congress’s criminal justice reform bill.

Then Obama began his push to the public and Congress. In 2015, he became the first sitting president to visit a federal prison, taking part in a Vice documentary that highlighted life in prison and criminal justice issues in general. He called for criminal justice reform in his 2016 State of the Union speech. And the White House held regular sessions with advocates and legislators throughout 2015 and 2016 to finally get a reform bill through the finish line.

Congress did not deliver. Thanks to the opposition of some of the most conservative members of the Senate (particularly Sessions, Trump’s pick for attorney general), the proposed bills never got anywhere.

So Obama again started taking matters into his own hands. Leveraging the president’s enormous clemency powers, he pardoned or commuted more than 1,900 federal convicts’ sentences — almost entirely for drug crimes. Based on data from the Justice Department, this means he’s used his clemency powers more than any president since Harry Truman (excluding Gerald Ford’s clemency for thousands of Vietnam War draft dodgers).

The Obama administration actively invited this. In early 2014, he rebuilt the Office of the Pardon Attorney with prisoners’ rights advocates. He called on federal inmates to submit applications for pardons and commutations, receiving as of December 31 nearly 36,000 requests — more than the previous eight administrations combined.

The process has not been without some big hitches. In January, the pardon attorney at the time, Deborah Leff, quit in a very public resignation after struggling to get the ball moving on as many commutations and pardons as she would have liked. (Politicians are notoriously cautious with pardons and commutations out of fear that if they let one person out who goes on to commit a crime, it could lead to massive political backlash.)

But as the year went on, Obama’s pardons and commutations began to roll out in the hundreds, adding up to the more than 1,900 clemency applications approved by the end of his presidency.

Again, drug policy and criminal justice reformers would have liked to see more and quicker. Most of the commutations and pardons that Obama granted were signed off on in just the past year. Much of Obama’s work on reducing prison sentences, including the Justice Department’s memo to prosecutors, came in his second term. And in total, the Obama administration formally denied at least 16,000 clemency petitions.

Still, the results have been historic: Obama will be the first president in 36 years, since Jimmy Carter, to leave office with a smaller federal prison population than the one he inherited. According to federal statistics, when Obama took office in 2009, there were nearly 209,000 federal inmates. Today, there are a fewer than 190,000.

That’s largely due to a decision by the US Sentencing Commission, an independent judicial agency, to guide judges to give, both retroactively and in the future, more lenient sentences for drug crimes — freeing thousands of federal prisoners in the process. But the Obama administration’s executive actions, from the Smart on Crime Initiative to its clemency actions, played a significant role as well.

“As an advocate, my desire was to see as much done as early as possible,” said Nicole Austin-Hillery, director and counsel at the Washington, DC, office of the Brennan Center for Justice. “But I’m just glad we started to finally see things moving.”

Looking the other way as states legalized marijuana

Beyond the commutations and pardons, there was an actual change in state laws that the Obama administration had to deal with in its second term: marijuana legalization.

For much of his first term, Obama was poised to be very regressive on marijuana. His administration was on track to raid more medical marijuana dispensaries than the Bush administration did. Legalization advocates were furious, with Marijuana Policy Project Executive Director Rob Kampia telling Rolling Stone in 2012, “There's no question that Obama’s the worst president on medical marijuana.”

Then, on the same day that Obama was reelected to his second term, something a bit unexpected happened: Colorado and Washington state became the first two states to fully legalize marijuana. States had legalized medical pot before then, but these were the first two to legalize the drug for recreational use.

Advocates who have worked closely with the White House said that the administration has never seemed to care much about this issue — leaving enforcement mostly to the whims of the DEA and prosecutors. But when two states legalized, the administration had to make its stance clear. So it did: States can experiment with legalization, and the feds will mostly stay out of the way. This was a stark shift from the first term, in which raids on dispensaries came with regularity. And it let Colorado and Washington state, as well as Alaska and Oregon later on, set up and regulate systems for legally selling weed.

To be clear, the Obama administration did not have to go this way. Under federal law, marijuana is still very much illegal — classified as a schedule 1 drug, the government’s strictest category for an illicit substance. But the administration, through the Justice Department’s Cole memo, told the states that as long as they follow some rules (like not letting legal pot fall into kids’ hands), the feds won’t crack down as they did in the past with medical marijuana. (And the administration also stopped a bulk of its raids on medical dispensaries.)

“He’s the best president ever on marijuana”

This has led to a very different assessment of Obama from advocates in 2016 compared to 2012. “He’s the best president ever on marijuana,” said Angell of the Marijuana Majority, acknowledging that there’s “an extremely low bar” for how presidents do on this issue. But by getting the feds out of the way through the Cole memo, Angell said, Obama let states “show the world that legalization works and does what we always said it would do.”

From then on, there was also an accompanying shift in how the president talked about pot in general. Obama always added the caveat that legalization is not “a panacea.” But he talked about his youthful use of marijuana as not a huge deal. He told the New Yorker that marijuana is no more dangerous than alcohol. And he said that pot should be treated as a public health issue, not a criminal justice issue, in a 2015 interview with a Kansas City news station.

Then, in early November 2016, he suggested that he’s for legalizing marijuana. He told Rolling Stone, “I do believe that treating this as a public health issue, the same way we do with cigarettes or alcohol, is the much smarter way to deal with it.” Tobacco and alcohol are, of course, legal, and the standard slogan for legalization campaigns is “regulate marijuana like alcohol.”

Still, Angell argued that Obama missed some big opportunities to push reform even farther. Obama’s first term was “atrocious,” Angell said. Obama didn’t push federal agencies to reschedule marijuana to a less restrictive classification. And Obama never gave out the mass pardons and commutations to federal drug offenders that advocates hoped for.

But despite these missed opportunities, advocates like Angell argue Obama has been a significant step forward on marijuana — and drug policy — reform.

Trump could undo all of Obama’s drug war reforms

Putting this all together, the Obama administration has overseen a significant shift in the war on drugs. It’s not an end to the drug war by any means, but it’s a huge change from all of the “tough on crime” talk and policies that have dominated drug politics for decades.

The bad news for reformers: President-elect Trump could undo all of this progress — and his pick for attorney general, as well as his campaign rhetoric, suggests he’s likely to try.

Trump himself ran on a clearly “tough on crime” platform. He argued for longer prison sentences on the campaign trail, as he did in his 2000 book, The America We Deserve. He called for more police departments to replicate “stop and frisk,” which a court struck down as unconstitutional in New York City because it disproportionately policed people of color. He warned that the Obama administration was working to release “thousands” of “violent criminals from the jails, including drug dealers and those with gun crimes.”

Then, Trump picked Sessions to head the Justice Department. Sessions was one of the few ultra-conservative senators responsible for the death of criminal justice reform efforts in 2016. He previously said that “good people don’t smoke marijuana,” while demanding that the Justice Department crack down on states legalizing pot. And in Senate hearings for his nomination earlier in January, Sessions was vague and unclear about how he would enforce federal law on marijuana as attorney general — only stating that federal agencies should enforce federal laws “so far as they are able.”

“If you had asked me a year ago who’s the worst senator on drug policy, I would have probably said Jeff Sessions,” Collins of the Drug Policy Alliance said. “Now he’s [set to become] the head of the Justice Department.”

A Trump administration and Sessions-led Justice Department could act on many of their “tough on crime” beliefs. They could be a nail in the coffin for federal criminal justice reform. They could rescind Justice Department memos that protected state-legal marijuana shops and growers and asked prosecutors not to go after low-level drug offenders. And they could push to focus more of the drug control budget on the law enforcement side, while suppressing much of the public health spending side.

“If you had asked me a year ago who’s the worst senator on drug policy, I would have probably said Jeff Sessions”

There’s some reason to doubt that the Trump administration will do much of this. For one, criminal justice reform has bipartisan support — acting as an unusual issue that brings together actors like the American Civil Liberties Union (ACLU), Grover Norquist, and the Koch brothers. So it’s possible that the Trump administration will avoid picking a fight against both parties and instead work on other priorities, like immigration and repealing Obamacare.

On marijuana, Trump has also said he would like to leave it to the states to handle legalization. So it doesn’t seem like Trump would be okay with the Justice Department cracking down on marijuana legalization, especially since it could inspire backlash from the voters in the now eight states that have approved legalization.

But acting on these issues, Collins pointed out, wouldn’t require a public speech from Sessions declaring a new war on drugs; much of the work could instead be done through back channels. And the mere appointment of a hard-liner like Sessions could signal to law enforcement agencies like the DEA, which the Justice Department oversees, that they can proceed with any “tough on drugs” crackdown they want, even if Sessions never gives a specific guidance to do so.

“The DEA was never on board with 99 percent of what the Obama administration wanted to do,” Collins said. “So it’s not like they’re necessarily waiting for a green light to do this.” (Obama himself recently acknowledged this, telling Rolling Stone that “the DEA, whose job it is historically to enforce drug laws, is not always going to be on the cutting edge about these issues.”)

There’s also the collateral damage that other Trump initiatives could do. As senior White House officials emphasized to me, one big part of Obama’s legacy in the war on drugs is how Obamacare doubled down on requirements for health insurers to provide drug abuse treatment as an essential health benefit and expanded health insurance to more patients in need of those benefits. If Trump repeals Obamacare or parts of it, a major part of Obama’s drug war legacy could be undone entirely.

Still, even if the Trump administration does go hard on these issues, there’s one bright spot: The federal government overall plays a fairly small role in criminal justice issues, with most relevant policies set at the state level. And states have been very willing to take on reform, going far ahead of the federal government in recent years in cutting down sentences for nonviolent drug offenders. So states’ rights could be the saving grace for criminal justice reform over the next four or eight years.

But that may be a small assurance to the Obama administration. After quietly chipping away for eight years to define Obama’s legacy on the war on drugs, much of that work now looks very fragile.