LAST June, the Supreme Court capped its most liberal term in decades by backing a right to same-sex marriage and rescuing Obamacare from a second near-death experience. One year later, contrary to expectations, the justices have delivered another series of rulings to vex conservatives. These outcomes owe something to the death of Antonin Scalia halfway through the term. But it is unlikely that the court’s rulings in two of the most politicised issues of recent decades—abortion and affirmative action—would have come out the other way had Scalia lived. The justice responsible for steering the court to the left was Anthony Kennedy, Scalia’s fellow Ronald Reagan nominee.

On June 23rd Justice Kennedy surprised many when he wrote the majority opinion in Fisher v University of Texas, reaffirming the principle that public universities may give limited consideration to race when admitting students. He had never voted before to uphold a race-based affirmative action policy. But by a 4-3 vote (Elena Kagan recused herself), Justice Kennedy and three liberal colleagues rebuffed Abigail Fisher, a white woman who felt she was the victim of discrimination when the University of Texas (UT) rejected her application in 2008. In 2013, when the justices first ruled in Fisher, they asked the 5th Circuit Court of Appeals to give UT’s admissions policy a closer look. It complied, approving the university’s programme anew and prompting Ms Fisher’s final appeal.

The admissions protocol at issue in Fisher is complex and, as Justice Kennedy writes, “sui generis”. For nearly two decades, UT has filled three-quarters of its places with Texas public-high-school students who finished in the top tenth of their graduating classes. In 2005, having achieved only modest success boosting diversity with this measure, UT started considering applicants’ race as one factor in the calculation for the remaining quarter of its incoming classes. (Ms Fisher had no quarrel with the top 10% plan; she challenged only the university’s consideration of race for those admitted as part of the “holistic review”.)

In his opinion, Justice Kennedy dispatched Ms Fisher’s arguments before concluding that the admissions scheme was a narrowly tailored means of advancing the university’s interest in cultivating a broadly diverse student body. Justice Samuel Alito, dissenting along with two fellow-conservatives, noted that “something strange has happened since our prior decision in this case”. But Mr Kennedy’s opinions in race cases show he has been edging towards this stance in Fisher. When he dissented from a 2003 ruling in favour of race-conscious admissions at a public law school, Mr Kennedy objected to its “predominant” use of race, noting that more “modest” attempts to bolster diversity posed no constitutional difficulty. In 2014, he deferred to Michigan’s voters, who scrapped affirmative-action at publicly funded universities in a referendum, writing that “it is demeaning to the democratic process to presume that the voters are not capable of deciding an issue of this sensitivity on decent and rational grounds.” And in 2015 he wrote that “much progress remains to be made in our nation’s continuing struggle against racial isolation.”

It was again Justice Kennedy to the rescue in Whole Woman’s Health v Hellerstedt, the most significant abortion ruling the court has handed down in a generation. On June 27th, by a 5-3 vote, the justices struck down the central provisions of a law that Texas Republicans had pitched as a measure to protect women’s health. By requiring abortion providers to have admitting privileges at a nearby hospital and mandating that clinics had to be retrofitted as “ambulatory surgical centres”, legislators said they were just trying to make the procedure safer.

In the oral argument on March 2nd, however, this goal was exposed as a poorly veiled excuse to limit access to abortion. Since the Texas statehouse passed the law in 2013, the number of abortion clinics in the state has fallen from 41 to 19. Had the justices upheld the law, that number would likely have halved again. In his majority opinion, Justice Stephen Breyer surveyed the record and found nothing showing that the new law advanced Texas’s legitimate interest in protecting women’s health. Texas imposed an “undue burden” on the right to choose by needlessly placing “a substantial obstacle in the path of women seeking an abortion”. The state’s lawyer did not help his argument by suggesting at one point that Texan women with no abortion clinics nearby could always drive to neighbouring New Mexico.

Bigger than Texas

The votes of Justice Breyer and the court’s three female justices were not in doubt. The question-mark was Justice Kennedy, who refused to kill Roe v Wade in 1992 but wrote a widely criticised opinion in a case upholding a federal ban on “partial-birth” abortion in 2007. In Hellerstedt he voted with the liberals. The court’s decision bodes ill for recent attempts in many other states, from Louisiana and Mississippi to Kansas and Nebraska, to impose similar regulations on abortion providers.

Though Justice Kennedy dislikes being called a swing justice, the title fits him. No other member of the court can lay claim to saving Roe v Wade, affirmative action and marriage equality while also gutting the Voting Rights Act, striking down campaign-finance laws (in Citizens United v FEC) and upholding the use of death-penalty drugs that carry a risk of inflicting something that looks a lot like torture. But this jumble of decisions seems odd mainly because justices habitually align their positions more closely with those of one political party or another. Justice Kennedy’s refreshing eclecticism reflects a judicial tendency that sidesteps ideology and does not fret unduly about consistency. More than anything, he has a knack for finding himself in the majority: in this term’s 75 cases, he has dissented only twice.