When Lara Alqasem was refused entry to Israel because of her connections to the Boycott, Divestment and Sanctions movement, and she remained in detention for two weeks because of her refusal to leave, the refrain from critics of the decision was: This is undemocratic.In the end, the Alqasem saga showed just how democratic Israel really is. Over the past two weeks, there have been a number of groups advocating against the decision to keep Alqasem out. The extremists said that keeping the former president of the University of Florida’s Students for Justice in Palestine out of Israel is fascist and McCarthyite.There were more moderate critics, including vocal Israel supporters, who said that, while all countries have the right to determine who enters their borders, liberal democracies should not be afraid of criticism, no matter how extreme, as long as there isn’t a clear security risk. Israel shouldn’t be engaging in punishing crimes that haven’t been committed yet, à la Minority Report.And then there are those who support the law to keep leading Israel boycott advocates out of the country, but said that Alqasem – a leader of an SJP chapter whose members could be counted on her fingers – who has now decided to study in Israel rather than boycott it, does not meet the standard of BDS leadership set in the vaguely worded law.The last group won in the High Court on Thursday, only proving that those who would call Israel undemocratic were wrong.Regardless of whether one agrees with the court’s decision, this is clearly a case where the system works. Instead of being thrown right back onto a plane, Alqasem was able to appeal her way up to the High Court and have her case be heard.There was something especially rich about the High Court ruling to let Alqasem into Israel coming down just as B’Tselem Director-General Hagai El-Ad told the UN Security Council: “The fact that the High Court approved the government’s decision [on Khan al-Ahmar] does not make the demolition just or even legal. It only makes the justices complicit.”That statement is more revealing about El-Ad than about Israel’s internationally respected judiciary. He turned out to be the one who is undemocratic; to him, a just court is not one that follows the rule of law set by a democratically elected parliament, but one that always agrees with his political position.Critics of the High Court on the other political side – those who oppose judicial activism – are also on shaky ground coming out against this decision for that reason. The court disregarded constitutional arguments against the BDS ban, upholding the law but saying the government was exercising it in the wrong way.Here we see how the Knesset passed a law, but the court determined that the government and lower courts had interpreted it too broadly, and overruled them.That is exactly the role of judicial oversight in a democracy: to make sure that those with the power to implement and enforce the law do so, without crossing into authoritarianism. Israeli democracy passed that test.