Antonin Scalia was an outspoken conservative whose decisions did not always fit neatly on the left-right scale. On such issues as flag burning and sentencing, he parted ways with many conservatives. For example, in the flag-burning case, he joined the majority decision affirming that burning the flag was a protected act of free speech.

Nonetheless, given our highly polarized era, the debate about replacing Scalia will be primarily about political, rather than legal, ideology.

So a useful place to start thinking about what comes next is to look at the political views of the justices, relative to the president and the Senate (more on the data is here, here and here). The graph below places these leaders on the left-right scale, including Obama, the nine justices, the Senate median (Mark Kirk (R-Ill.)) and the senator whose vote would hypothetically be necessary to end a Republican filibuster.

The median justice on the court — the one “in the middle” — is Anthony Kennedy. He is the “swing justice,” whose vote is frequently decisive. Were Obama to replace Scalia with a liberal justice, the justice in the middle would be somewhat significantly more liberal than Kennedy. If Obama could get his most preferred nominee confirmed, that would make Kagan the new median justice.

This would create a massive shift in the court’s ideology — more than when Arthur Goldberg replaced Felix Frankfurter in 1962 and akin to the shift when Nixon replaced Earl Warren and Abe Fortas with Warren Burger and Harry Blackmun.

Of course, Obama won’t simply get his way. He needs to nominate someone who can be confirmed by the Senate.

In the Senate, the first question is whether any nominee would face a filibuster. In the past, the Senate has not necessarily filibustered even controversial nominations. Justice Clarence Thomas was approved by a 52-48 vote, an outcome Democrats could have filibustered. However, given the current mood of Republicans in Washington and out on the campaign trail, a filibuster seems probable, even likely.

So what does Obama do now? The question is whether he would prefer nominating a justice who could satisfy enough Republican senators to break a filibuster or prefer leaving the seat open.

With the seat open, votes in the court would hinge on the justices closer to the middle — Kagan and Kennedy. If a lower court decision were more liberal than Kagan, Kagan could side with the conservatives to overturn. If a lower court case were more conservative than Kennedy, Kennedy could side with the liberal justices to overturn. If a lower court case produced an outcome between Kagan and Kennedy, the outcome would stand (as the court would divide 4-4 and hence produce no decision).

If an eight-person court produces decisions that are ideologically between Kagan and Kennedy, Obama’s task is to try to find a nominee that would make that 60th senator — the one who could end a filibuster — prefer confirming that nominee to leaving the seat open.

Obama could do this by nominating someone roughly halfway between Kennedy and Kagan. This person would produce essentially the same outcome as an unfilled seat — that is, policies to the left of Kennedy and to the right of Kagan.

And if Obama’s nominee were a little more conservative than that, it would actually be more attractive to pivotal senators to confirm that nominee than to leave the seat open. And Obama could still be satisfied that he moved the court to the left.

Of course, senators may not think like this at all. One could imagine senators (especially those running for president) committing to block any Obama nominee, even one that could produce a better ideological outcome than leaving the seat unfilled. And much will depend on people’s expectations about who will win the presidential election — which could make Obama or Republicans less willing to compromise if they think their side will do well.

The wildcard here is the biography of any nominee, which could be influential above and beyond ideology. If the president can identify a nominee whose life and qualifications make him or her more attractive, this could increase the chance of winning votes in the Senate, even if that nominee is relatively liberal.

Or Obama could try to appeal to the Senate with a nominee committed to deference to Congress. This trait was once strong on the court, but has virtually disappeared. A justice committed to deference could conceivably be less threatening to senators.

The bottom line is that there do exist nominees that should be more attractive to 60 senators, compared with leaving Scalia’s seat unfilled. But senators may prefer to wait, hoping for a Republican White House in January 2017.

And rather than anger Democrats by picking a true moderate, Obama will presumably be doing everything he can to find a qualified and likable nominee — someone the public likes enough that Republicans will pay a high price for failing to confirm that person.

Michael A. Bailey is the Colonel William J. Walsh Professor of American Government in the department of government and the McCourt School of Public Policy at Georgetown University. With Forrest Maltzman, he co-authored “The Constrained Court: Law, Politics and the Decisions Justices Make” from Princeton University Press.