WASHINGTON (CNN) – The Supreme Court term that was rocked midway with the sudden death of Justice Antonin Scalia came to a close on Monday, showcasing once again the pivotal role of Justice Anthony Kennedy.

It was a term few expected. Back in October, many believed the court was poised to take a right turn after having cleared the way for gay marriage and ruled in favor of Obamacare.

The new docket included cases on public sector unions, voting rights and affirmative action. An abortion case loomed as a potential grant.

The conventional wisdom was that the five conservative justices would come together and swing the court to the right on some of those hot-button issues that capture the public's attention.

But that didn't happen. Everything changed on the night of February 13, when Scalia, a conservative titan, died while on a trip to Texas. That created a 4-4 split among liberal and conservative-leaning justices and changed the calculus on the bench over how cases were decided.

Then, Kennedy stunned court watchers when for the first time, he voted in favor of an affirmative action plan in upholding the race-conscious admissions plan at the University of Texas. His majority opinion in the 4-3 case set out a road map of sorts for other schools to follow. Justice Elena Kagan recused herself in the case.

"Kennedy's evolution matters because at least for the moment, his is the decisive vote on this and subsequent challenges that are already in the pipeline, on the constitutionality of race-based affirmative action programs," said Steve Vladeck, a CNN contributor and professor of law at American University Washington College of Law.

On the final day of the term, he then joined the four liberals in rejecting a Texas law that limited access to abortion clinics.

Kennedy has penned virtually every major abortion ruling since joining the court in 1988, including the 1992 Planned Parenthood v. Casey ruling that said states could impose restrictions as long as they didn't impose an undue burden on the woman and a controversial 2007 decision upholding the federal ban on so-called "partial-birth" abortions.

Although he was the decisive vote in the 5-3 decision, Kennedy allowed Justice Stephen Breyer to write the strongly worded opinion.

While Supreme Court opinions and justices are always fodder for the campaign trail, Scalia's death also injected new fire into the 2016 election.

Both sides quickly began to clamor about the importance of naming Scalia's replacement, with liberals having an opportunity to turn an influential, conservative seat to their side and conservatives looking to hold the line.

Scalia's death ignited a debate on the presidential campaign trail about the future of the court as Republican candidates attacked Chief Justice John Roberts for his past votes on Obamacare, and it triggered a nasty battle between the political branches concerning whether Merrick Garland, Obama's choice to replace Scalia, would get a confirmation hearing before the election.

Thrust into the political spotlight, the court had to stare down the reality of potential 4-4 splits.

For the most part, the justices kept their heads down, expressing their grief about the loss of a colleague but refraining from discussing the political maelstrom. The message they sent was that court was going to function with eight members like it had before at various times in history.

Ultimately, in those handful of closely watched cases that grab the public's attention, there was a watershed opinion on abortion, a surprise in affirmative action and 4-4 splits including the one that torpedoed the President's controversial executive actions on immigration. There were some narrow decisions, and a carefully crafted compromise.

Breyer emphasized at one point that Scalia's death would only affect a few cases and reminded his audience that the court is unanimous about 50% of the time.

But Justice Ruth Bader Ginsburg did not exactly concur with her colleagues.

Eight "is not a good number," she told an audience in New York.

Grappling with the reality of eight, however, the court was left to see if there were areas in some of the cases where the justices could find common ground.

The justices are often frustrated that court watchers only zero in on a few cases each term. But those cases are usually the ones with the broadest appeal, and those are the ones that, before Scalia's death, might have been 5-4.

Four times during the course of the term, the justices were left issuing a single sentence instead of deciding a case on the merits. When the court is evenly divided, it simply upholds the lower court opinion but sets no new precedent.

One 4-4 split upheld a lower court's decision that overturned President Obama's executive action on immigration.

The court's deadlock affected some 5 million undocumented immigrants and gutted what Obama thought might be a big part of his legacy.

Supporters of the President's actions said the split was why Republicans should move for a vote for Garland. "This decision, or non-decision, represents a signal failure of democracy," Walter Dellinger, the former acting solicitor general in the Clinton administration wrote in Slate.

The court also heard a case concerning the Affordable Care Act's contraceptive mandate. Most everyone who attended oral arguments thought another 4-4 split was coming. But instead, the justices did something different: they sent the case back down to the lower court and suggested the parties find a compromise. Both sides came away with something, but the court left for another day the religious liberty dispute that brought the parties to court in the first place.

Another noteworthy split came in a case concerning fees for non-members of public sector unions. Progressives feared the conservatives, led by Justice Samuel Alito, were going to strike a blow to the unions. But after Scalia's death, the court announced the split, delivering an unexpected victory to progressives by upholding the lower court decision that went in their favor.

The losers in that case have already petitioned to have the court hear the case again once it is at full strength.