In democracies, public support for the judiciary is crucial to prevent abuse of power. While facing the COVID-19 pandemic, governments may overly restrict their citizens' rights. This study examined whether voters would support a court's ruling if the court decided that the government's restriction of their rights was illegal. Supposing that voters faced with the risk of a pandemic will support a government with the resources to prevent a pandemic, we set up the following hypotheses: If the courts nullify the measures against COVID-19, the public will not support the courts, and the government's non-compliance with the court's ruling will not diminish support for the government. We find support for these hypotheses in the contexts wherein the degree of restriction is weak. Because there is a close relationship between ``public support for the court'' and ``government abuse of power,'' we need to consider which factors determine support for the court.