There seems to be no middle ground, politically speaking, on President Trump’s travel ban aimed at seven majority-Muslim countries. But today, the Supreme Court found it.

Addressing two pending cases challenging the bans (both the original ban and the later, “watered down” version), the Court agreed to hear the challenges in an expedited fashion, early next fall. In the meantime, the Court upheld the lower court's injunction against the ban on those with “bona fide relationships” to people or institutions in the United States, but, surprisingly, reinstated the ban on those without such relationships.

In other words, if you’re a random Syrian refugee stuck in a camp in Turkey, Trump’s travel ban is back in effect, and you cannot enter the U.S. But if you have a parent in the U.S., or if you’ve been accepted to an American university, or if you have a job offer from an American company, then the ban is blocked, and you can enter the country.

To some, this result may seem like an arbitrary compromise: If the ban discriminates on the basis of religion, how can it possibly remain in effect at all? But if the ban is necessary for national security, how can the Supreme Court stop the government from enforcing it?

In fact, however, the Court’s action makes a lot of sense. As the Court noted in its 16-page opinion – written without attribution, but in the clear writing style of Chief Justice Roberts – injunctions like the ones in these cases are always a matter of discretion. There are valid interests on both sides, and while courts decide between them, they have to balance those interests against one another.

Here, the Court noted that people with a bona-fide relationship – a relative, a job offer, and so on – are clearly harmed by the travel ban. One of the plaintiffs was trying to bring his Iranian-born wife into the country, for example, but has been stymied by the travel ban. That’s a clear, and severe, harm.

But the harm is a little less clear when you’re just a Yemeni (or Libyan, Iraqi, Iranian, Syrian, Somalian, or Sudanese) individual trying to get into the U.S. Obviously, there is still some harm, and it may be severe if you’re a refugee. But, the Court noted, so is the government’s claim that the ban is necessary to keep people safe from terrorism.

Many progressives may dismiss that claim, of course, but remember, this is about an injunction while the claim is to be evaluated. Maybe the whole travel ban is unconstitutional, as several courts have already determined. But until that’s decided, courts issuing or staying injunctions have to use their discretion.

What happens next is clear on one level, unclear on another. In the fall, the Supreme Court will hear arguments for and against the ban, and they will issue a ruling. That much is clear.

But because the ban was initially intended to be a 90-day stopgap while the administration devised a new immigration policy, actually the whole question could be moot by the time the Court gets its chance to review it. Indeed, since the revised ban was issued on March 16, the Court signaled that it already expired on June 14.

In this regard, the Trump administration has been at its most Trumpian, saying that, in fact, the 90-day ban only begins once all injunctions are lifted. That’s a ridiculous claim, on the face of it. If the ban is supposed to give the government time to create a policy, why does it matter whether it’s permitted or enjoined? The government has had its time, and so the ban has outlived its usefulness.

But of course, what’s really going on is that the Trump administration doesn’t know what “extreme vetting” means any more than you or I do, and the ban is a temporary-on-the-way-to-permanent policy that is as much about politics as about national security. There’s no correlation between being from these six countries and being a terrorist – on the contrary, most of the terrorists in recent European attacks have been citizens of the countries they attacked. The travel ban is a broad action that is about anti-Muslim politics, not national security policy.

That’s why its odds don’t look good at the Supreme Court. Even if you count up conservatives and liberals – and the former now outnumber the latter 5-4 – it’s hard to see the court’s centrists, especially Chief Justice Roberts, writing a blank check to the government to issue automatically renewing travel bans simply on say so. National security is not a Netflix account.

So even if the court’s hard right – Justices Gorsuch, Thomas, and Alito – disbelieve the arguments that the travel ban discriminates on the basis of religion and exceeds executive authority, there will still be the question, come October, of why a three-month temporary ban is still necessary seven months after it was put into place.

In the meantime, neither progressives nor Trumpists will be thrilled at the Supreme Court’s action today. For progressives and some conservatives, excluding anyone on the basis of religion is against American values. For Trump’s base, it’s wrong for courts to overrule the president on matters of national security.

But for everyone in between, the Court’s middle ground may seem like an island of sanity.