This year’s Supreme Court term was unsettling. Following the sudden death of conservative Justice Antonin Scalia earlier this year — and Senate Republicans’ refusal to fill the seat — it initially seemed the Court might take a more reserved approach.

And the justices did punt in a few areas, including birth control access, and made more convoluted decisions in other cases, but they didn’t back away from all major decisions, particularly in high-profile cases. A few clear winners and losers emerged: The Court decided on the first major abortion rights case in a generation, and essentially put an end to the Obama administration’s sweeping deferred deportation plans for undocumented immigrants.

Here’s who came out ahead this term and who may be traumatized by the sound of a gavel in the future.

Winner 1: Texas

Yeah, there were 26 states involved in suing the Obama administration over its 2014 executive actions allowing millions of immigrants to apply for "deferred action" — actions that the Supreme Court all but killed at the end of the 2016 term, when a 4-4 deadlock left the injunction against them in place. But there’s a reason the case was called United States v. Texas: The Lone Star State was the star of the show.

Texas was the only reason the states didn’t get laughed out of court. While all the states suing the administration claimed they’d be harmed by the president’s actions, thereby giving them legal grounds to sue, Texas was the state that actually estimated the cost of expanded driver's license access.

Because the courts don’t allow states to sue over federal policies just because they don’t like them, that made all the difference. A state-based lawsuit against Obama’s 2012 "deferred action" grants went nowhere because the states couldn’t show harm; in 2016, half the Supreme Court was willing to grant that some extra driver's license costs in one state justified a halt to the policy in 50 of them.

Though 4-4 deadlocks don’t make precedent, the conclusion is clear: The door for states to sue the federal government over policies might be wider than it used to be, and it might depend on whether the policies are liberal or conservative. Republicans might have a hard time winning the White House in the medium term, but if deep-red states like Texas get to keep challenging policies from a Democratic White House, that’s a big win. —Dara Lind

Winner 2: Evidence

When the Supreme Court sided with abortion rights advocates in Whole Woman’s Health v. Hellerstedt, it also sided with medical evidence. It’s a bit worrisome that "siding against medical evidence" was a legitimate possible outcome in this case, but it’s true.

In Whole Woman’s Health, the Court struck down two Texas anti-abortion laws that were supposed to make abortion safer for women. Doctors and just about every major medical association you could think of said the laws actually did nothing to preserve women’s health and only served to shut down quality clinics.

But reproductive rights supporters had good reason to worry that it wouldn’t matter how strong the evidence for their case was. That’s because of precedent set in the last major abortion case heard by the Supreme Court, 2007’s Gonzales v. Carhart, which struck down so-called "partial-birth abortion." Carhart found that lawmakers have "wide discretion to pass legislation in areas where there is medical and scientific uncertainty."

The question was: What counts as "uncertainty"? Can state legislatures pass laws based on junk science without facing any legal repercussions by claiming the science is "uncertain"? That’s what the Fifth Circuit Court of Appeals argued when it upheld the Texas laws, citing Carhart to claim that "medical uncertainty underlying a statute is for resolution by legislatures, not the courts."

Justice Stephen Breyer wasn’t buying it, though. He said that when it comes to the constitutionality of abortion regulations, the Court "has placed considerable weight upon evidence and argument presented in judicial proceedings." He pointed out that Carhart also found that the Court "retains an independent constitutional duty to review factual findings where constitutional rights are at stake." Then he proceeded to rattle off a wealth of evidence from earlier judicial proceedings that demolished Texas’s claims that the laws benefited women’s health.

This new precedent arguably puts anti-abortion advocates in a much weaker position to restrict abortion at the state level than before Texas passed HB 2. Abortion opponents will undoubtedly keep trying other tactics to impose restrictions — but they will have a harder time convincing a court that these tactics serve a legitimate purpose other than unconstitutionally making it harder for women to get an abortion. —Emily Crockett

Winner 3: Affirmative action

The University of Texas Austin was Abigail Fisher’s dream school. But when the university rejected her application for admission in 2008, Fisher refused to take no for an answer. Rather than accept that she simply didn’t make the cut, she began a crusade arguing that the university gave her spot to an unworthy person of color because of race.

She advocated that a race-neutral, merit-based policy was necessary. Yet Fisher, who had the advantage of applying as a legacy admit, simply didn’t stand out in an especially competitive admissions cycle with her test scores, grades, and extracurricular activities, court documents showed. Additionally, 42 out of 47 students who were offered provisional slots with lower scores than Fisher were other white students.

More broadly, the Court’s decision that UT Austin’s use of race in its admissions policy is constitutional shows race-conscious admissions are here to stay — for now. Private and public universities alike are heralding the decision as a clear indication that racial and ethnic diversity remains necessary in higher education.

But as Justice Anthony Kennedy cautioned in the opinion, schools still need to seek other ways to achieve racial parity in admissions by diligently reevaluating and updating their admissions policies without tokenizing students for their racial backgrounds. This was key to UT’s admissions policy and the Court’s decision to rule in its favor. Other schools like Harvard University that are facing similar lawsuits that were stalled pending the Fisher decision will have to prove the same if they want the same outcome. —Victoria Massie

Winner 4: Politicians

The specifics of former Virginia Gov. Bob McDonnell’s corruption convictions looked ugly. He and his family accepted $175,000 worth of loans and gifts — including a Rolex watch for McDonnell — from a businessman who wanted the Virginia government to help out his supplement company.

But accepting those gifts was perfectly legal in Virginia, so McDonnell instead was prosecuted for what he did in return for them. The problem, some argued, was that he didn’t actually do all that much. He contacted some state officials on the company’s behalf, set up some meetings, and arranged some events. No state money ever changed hands, and no policy was ever altered.

So many members of both parties’ legal establishments were quite troubled by his prosecution, saying it amounted to a "breathtaking expansion of public-corruption law" that "would likely chill federal officials’ interactions with the people they serve and thus damage their ability effectively to perform their duties.’" They feared that the ordinary, day-to-day work of politicians could become criminalized.

Now a unanimous Supreme Court has agreed with their objections, overturning McDonnell’s convictions — and politicians all over the country are likely breathing sighs of relief. —Andrew Prokop

Winner 5: Tribal courts

There are 175 tribal courts in the US, but there’s been little clarity on their jurisdiction outside of tribal lands. Because the lines are unclear, Dollar General has been able to evade facing a civil lawsuit filed against the company in 2005 after an employee was accused of molesting a 13-year-old Choctaw boy at a store on a Choctaw reservation two years prior.

The retailer’s argument in Dollar General v. Mississippi Band of Choctaw Indians? Recent Supreme Court cases had limited tribal courts’ inherent sovereignty, so it should also apply in this case.

In 1978’s Oliphant v. Suquamish Indian Tribe, the Supreme Court ruled that tribal courts were prohibited from reviewing criminal offenses committed by nonmembers. In 1981’s Montana v. United States, the Court ruled that native tribes generally do not have inherent sovereignty over nonmembers on their reservations with two exceptions: if nonmembers enter into "consensual relations with the tribe or its members," and if a nonmember’s conduct threatens the tribe’s "political integrity, economic security, or health or welfare."

The burden was on Dollar General to prove Montana didn’t apply, while also arguing the Oliphant decision would apply to civil suits.

With a 4-4 non-decision, the discount retailer still may have to face its day in tribal court. But more importantly, the case is a small step toward affirming tribal courts' authority — even if it's based on the Supreme Court not deciding one way or the other to take more rights away. —Victoria Massie

Loser 1: The Fourth Amendment

The Fourth Amendment has been a loser for basically every Supreme Court session of the past 20 years. The Court hasn’t had a former criminal defense lawyer as a member in a quarter-century — perhaps unsurprisingly, it’s been much more deferential to police than "suspects."

Arguably, this term wasn’t even as bad for the Fourth Amendment as it could have been: Last week the Court did hold that police couldn’t conduct warrantless blood tests on drivers suspected of DUI, though it maintained that warrantless breathalyzer tests were kosher.

Killing the driver, though, is apparently okay: In an 8-1 decision granting legal immunity to a police officer who shot and killed a driver as he was fleeing, the Court said it has "never found the use of deadly force in connection with a dangerous car chase to violate the Fourth Amendment." (Justice Sotomayor called the decision a license to "shoot first and ask questions later.")

And even if an officer acted unconstitutionally, suspects can still be out of luck. The "exclusionary rule" is supposed to prevent evidence gathered unconstitutionally from being used at trial, but the Supreme Court has been chipping away at it for years, and struck it another blow at the end of this term. In Utah v. Strieff, the Court found that even though a driver had been stopped unconstitutionally, the drugs seized during the unconstitutional stop were still admissible — because the officer had discovered an outstanding warrant afterward, offering retroactive validation.

Justice Sotomayor’s dissent in Strieff got deserved attention; what got less attention was that (thanks to Justices Elena Kagan and Ruth Bader Ginsburg) she wasn’t alone in dissenting, as she’s often been in Fourth Amendment cases on this Court. Maybe that’s a good sign. But a three-justice dissent is still a dissent. —Dara Lind

Loser 2: Merrick Garland

Yes, President Obama’s choice to replace the late Justice Scalia lost in one obvious way — he still hasn’t been confirmed to the Court and hasn’t even gotten a Senate hearing. But in addition to that, the argument that he should be speedily confirmed because the Supreme Court would be completely dysfunctional with only eight justices took a bit of a hit — because just 6.9 percent of cases since Scalia have ended up as 4-4 ties, according to CNBC.

Now, these deadlocks do include a few major cases — on unions, immigration, and tribal jurisdiction. So the confirmation of Garland or another justice would still matter a great deal. But the Court was relatively functional without Scalia, all things considered, so Democrats lost one potential argument they could make in favor of a speedy confirmation of Garland. —Andrew Prokop

Loser 3: Texas

Texas lawmakers worked really hard to pass the anti-abortion bill HB 2 in 2013. Gov. Rick Perry called a special legislative session to pass it, and succeeded despite a filibuster from Wendy Davis and a state capitol full of pro-choice protesters.

Parts of HB 2 still stand, but its biggest anti-abortion tools — the two provisions that closed about half of the state’s clinics — are now constitutional toast.

What’s more, as outlined in the "evidence" entry above, Whole Woman’s Health v. Hellerstedt is a much stronger abortion rights decision than the last one the Court handed down in 2007’s Gonzales v. Carhart.

It’s too soon to tell how far-reaching Whole Woman’s Health will be when it comes to the many, many other anti-abortion laws that states have passed. And anti-abortion lobbyists are nothing if not creative when it comes to inventing new model legislation to try out in the states.

But it looks like Texas has singlehandedly made it a lot harder for the pro-life movement to carry out its long-term plan of regulating abortion out of existence at the state level. —Emily Crockett

Loser 4: Puerto Rico

Hopes of Puerto Rico becoming a self-determining entity were squashed this Supreme Court cycle.

Right now Puerto Rico’s economy is in a "death spiral." The small Caribbean island is facing a $72 billion debt crisis it cannot pay. And although Puerto Rico is a primarily self-governing body, as a US territory its power depends on Congress, which offers little relief.

In 1984, Congress passed a federal bankruptcy law denying the island (and Washington, DC) any semblance of statehood status that, by extension, barred it from filing Chapter 9 bankruptcy.

However, in Puerto Rico v. Franklin California Tax-Free Trust, Puerto Rico appealed to the Supreme Court to see if it would grant the island the freedom to attempt independently restructuring its debt. Instead, the Court ruled against it, further solidifying Congress’s power to micromanage the island.

Puerto Rico’s hands are tied. The island faces the possibility of defaulting on a $2 billion payment for major utilities like electricity and water sewage in July. But without the prospect of statehood, the Supreme Court ruling only exacerbates the extreme difficulties Puerto Rico is facing. —Victoria Massie