Justice Anthony M. Kennedy, flanked by colleagues Justice Ruth Bader Ginsburg and Chief Justice John G. Roberts Jr., has on occasion left his ideological mates on cases to join the other side to make a winning majority. (Jacquelyn Martin/AP)

The statement came from the president of the Ms. Foundation for Women, Teresa C. Younger, but it easily captures the mixed emotions of everyone from President Obama to the conservative thinkers at the Heritage Foundation:

“Today we are simultaneously encouraged, deeply disappointed and ultimately frustrated by the United States Supreme Court’s rulings.”

The Supreme Court’s like that, especially at the end of the term, when justices issue their most important decisions. The ideologically divided court zigs left or right and earns cheers from the winning partisans. Then it zags in the other direction, and the plaudits turn to brickbats.

[Supreme Court upholds Texas affirmative action plan]

This is what muddies the public’s perception of the court. Approval of the justices’ performance often turns on the latest blockbuster decision.

On Monday, the court will end a strange and ill-fated term, dominated by the February death of Justice Antonin Scalia. Its decision-making has been hampered by, as the eight remaining justices have put it four times already, “an equally divided Court.”

Remaining on the docket for the final day are a ruling on the most important abortion case in 25 years and a decision on whether former Virginia Gov. Robert F. McDonnell was wrongly convicted of public corruption.

[Justices seem skeptical of McDonnell’s conviction]

Abortion rights advocates are cautiously optimistic about their chances to strike down Texas’s restrictions on abortion clinics. That’s based not on a leak from inside the court but instead on the act of deduction, a version of Supreme Court bingo.

Each justice usually writes at least one opinion from each of the court’s seven sessions of oral arguments. Liberal Justices Stephen G. Breyer and Elena Kagan, both seen as abortion rights allies, are the only ones who have not written from the period in which Whole Woman’s Health v. Hellerstedt was argued.

Likewise, McDonnell’s patrons are quietly cheered — no one wants to say it out loud — by the fact that the only justice who has not written from the April sitting is Chief Justice John G. Roberts Jr. At oral argument, Roberts appeared skeptical not only of McDonnell’s conviction but also of the very law he was convicted under, which the chief justice ventured might be too vague to stand.

Grain of salt: The court is always capable of surprise. And the most important justice at any point is the one who leaves his or her ideological mates on a specific case and joins the other side to make a winning majority.

For a decade or more, that has been Justice Anthony M. Kennedy, the Ronald Reagan nominee who usually votes with his conservative colleagues but is also the most likely of them to agree with liberals on big social issues.

Opponents of affirmative action had reason to be heartened when Roberts announced Thursday morning that Kennedy had written the court’s opinion in Fisher v. University of Texas at Austin, the long-running case that threatened to restrict university and college officials from considering race when making admissions decisions.

Kennedy was the author of the court’s opinion three years ago that cast doubt on UT’s plan and sent it back to a lower court to carefully apply the judiciary’s most demanding scrutiny, warranted when a government uses racial classifications.

[Supreme Court sends Texas plan back for additional scrutiny]

But the lower court said UT had justified its actions, and Kennedy on Thursday was joined by the court’s liberals in issuing a 4-to-3 ruling that agreed (Kagan recused herself because of her previous work on the case as solicitor general in the Obama administration).

“I have to say I was shocked by Justice Kennedy’s decision in the Fisher case,” said Elizabeth Slattery, a legal fellow at the Heritage Foundation.

She and other critics were stunned by Kennedy’s finding that “considerable deference is owed to a university in defining those intangible characteristics, like student body diversity, that are central to its identity and educational mission.”

They thought that undermined the court’s 2013 directive to lower courts to scrutinize UT’s justifications for using race.

“It isn’t every day that a Supreme Court justice guts his own precedent, but that’s what happened Thursday,” the conservative editorial writers at the Wall Street Journal opined.

And Justice Samuel A. Alito Jr. began his impassioned 51-page dissent this way: “Something strange has happened since our prior decision in this case.”

At one point, Kennedy approvingly referred to a passage in Justice Ruth Bader Ginsburg’s opinion in the previous case, when she was the lone dissenter to the idea it needed to be sent back to the lower courts.

But what appears to opponents of affirmative action as a retreat on Kennedy’s part ignores a concerted effort on the other side.

UT and its lawyers — led by former George W. Bush administration solicitor general Gregory G. Garre, because of reluctance by Texas officials to defend affirmative action — sharpened their argument that the university’s unique policy of admitting the top students at each Texas high school was not enough to ensure a diverse student body.

A small army of university officials, social scientists and civil rights groups bombarded the court with amicus briefs that said now is not the time to abandon affirmative action.

Kennedy’s hand is less visible in the court’s other major ruling on Thursday, regarding Obama’s executive action on immigration, but only because of the court’s opacity. It does not identify how the justices split in tie votes.

But it seems highly unlikely that there would have been four votes to uphold a lower court’s decision blocking Obama’s deportation plan from implementation without Kennedy. The tie vote scuttles the program, without any ruling from the justices on the merits of the plan or whether Obama exceeded his powers.

And whatever the outcome on the abortion restrictions Monday, Kennedy’s vote will be the key, all sides agree.

“For the time being, at this specific time on this court, Kennedy remains the pivotal justice,” said Steven R. Shapiro, legal director of the American Civil Liberties Union.

But, like most, Shapiro notes this term felt different. Change is coming. Kennedy turns 80 next month. The court at some point will have nine members again.

And whether the seat is filled by Obama’s nominee, Judge Merrick B. Garland — or by the choice of President Clinton or President Trump — there will be a new court.