The Connecticut Supreme Court considered whether patting down an innocent man who ended up having an unlicensed weapon was warranted, considering a serious crime had just taken place in the neighborhood.

Associate Justice Gregory D’Auria wrote the 37-page unanimous ruling, which affirmed the appellate court in Connecticut v. Lewis. The case looks at whether the patdown is unlawful under the federal and state constitutions. The high court’s ruling shows there are many nuances and no easy answers.