The American judiciary is currently engaged in a vigorous debate that can be summed up in one question: Can you diminish your Fourth Amendment rights by exercising your Second Amendment rights? The Fourth Amendment protects individuals against “unreasonable searches and seizures”; the Second Amendment safeguards the right “to keep and bear arms.” What happens, then, if police officers search or seize a person solely because he is carrying a firearm? Is that “unreasonable” under the Fourth Amendment and therefore illegal?

Last week, an Illinois appeals court answered that question in the affirmative, ruling that mere possession of a handgun does not justify a search or seizure. Liberals and conservatives alike should cheer the court’s decision. Empowering law enforcement to curtail the Fourth Amendment makes no one safer, even when it’s done in the name of controlling gun violence. And allowing officers to target gun owners without suspicion of wrongdoing puts us all at greater risk of harassment, discrimination, and brutality.

Unfortunately, not every court sees the issue that way. In January, the 4th U.S. Circuit Court of Appeals found that when officers conduct a lawful traffic stop, they may frisk the driver if they “reasonably believe” him to be armed—“regardless of whether the person may legally be entitled to carry the firearm.” Even if the individual holds a concealed-carry permit, the court clarified, an officer may still search him without having any suspicion that he committed a crime. In a trenchant critique of the ruling, National Review’s David French wrote that the majority was “relegating lawful gun owners to second-class-citizen status.” While that might sound dramatic, Judge James Wynn admitted as much in a concurrence, declaring that gun owners “forego other constitutional rights,” including freedom from unannounced police intrusion and freedom of speech.

We didn’t have to wait long to see what Wynn’s theory looks like in practice. In March, the 11th U.S. Circuit Court of Appeals, sitting en banc, refused to reconsider a decision previously issued by a panel of 11th Circuit judges. The panel had thrown out a lawsuit against a police officer who suspected, without any good reason, that a criminal might be lurking inside a particular apartment. In the dead of night, the officer banged on the apartment door. (He did identify himself as law enforcement.) The startled resident retrieved the firearm that he lawfully owned and slowly opened the front door. When he saw a shadowy figure holding a gun, he retreated inside. The officer shot him dead as he was attempting to close the door.

Endorsing the 11th Circuit’s decision not to re-evaluate the case, Judge Frank M. Hull likened the officer’s behavior to the “knock and talk” rule. This rule permits officers to knock on an individual’s door for “legitimate police purposes.” Hull explained that here, the officer had simply engaged in a variation on a “knock and talk.” When he saw a firearm, he perceived a threat and opened fire. This shooting of an armed individual in his own home, Hull insisted, did not violate any “clearly established … constitutional rights.”

But as Judge Beverly Martin pointed out in dissent, the officer violated at least two constitutional rights. First, he used “objectively unreasonable” excessive force in violation of the Fourth Amendment. Second, this force “plainly infringes on the Second Amendment right to ‘keep and bear arms’ ” as established by the Supreme Court in 2008’s District of Columbia v. Heller. Martin wrote:

If Mr. Scott was subject to being shot and killed, simply because (as the District Court put it) he made the “fateful decision” to answer a late-night disturbance at the door to his house, and did so while holding his firearm pointed safely at the ground, then the Second Amendment (and Heller) had little effect.

“The Second and Fourth Amendments,” Martin concluded, “are having a very bad day in this Circuit.”

Martin should be pleased to learn that both amendments are faring much better in the Illinois First District Appellate Court. A panel of judges for the First District was confronted with what is, by now, a familiar fact pattern. Markell Horton, a black man, was standing on a porch when two police officers drove by. The officers saw a “metallic object in his waistband” that they believed to be a weapon. They stopped the car and got out, at which point Horton went inside the house. The officers walked up to the porch and, they claim, found a set of keys on the ground. They unlocked the front door and entered the house, finding Horton in a bedroom, crouching next to a bed. One officer, Roderick Hummons, detained Horton and searched the room, discovering a gun underneath the mattress. The state charged and convicted Horton, who had a criminal record, of knowingly possessing a firearm after being convicted of two qualifying felonies.

To summarize: Two officers stopped in front of a house, at which point its apparent residents went inside. Because one resident might have been armed, the officers barged into the house and detained its occupant while searching for the weapon. Yes, it turned out to be possessed unlawfully. But what if Horton had a concealed-carry permit? At the time of the search, the officers only knew that a man with a gun was inside of a house. Did that give them reasonable suspicion to enter the house and search it?

By a 2–1 vote, the court said no. Possession of a gun, the majority wrote, does not, on its own, give officers reasonable suspicion or probable cause to conduct a search or seizure. The dissent argued otherwise, noting that although a gun owner could have a permit—called a Firearm Owners Identification, or FOID, card in Illinois—he might also possess his firearm illegally. “This rationale,” the majority responded, “leads down a dangerous path”:

It is also illegal to drive a car without a valid license. If an officer makes eye contact with another motorist, and that motorist then turns onto another street, can the officer execute a traffic stop to verify that the motorist has a valid driver’s license? In that situation, we would say the police officer needed to have reasonable suspicion, based on articulable facts, that this particular motorist did not have a valid license. Officer Hummons had no articulable facts to believe that Horton was carrying a firearm without a valid FOID card.

The majority also noted that, given Chicago’s ongoing history of police misconduct, Horton did not create reasonable suspicion by quickly entering the house upon sight of the police. “In an environment where minorities have legitimate suspicion of how they might be treated by police,” the court explained, “they will be more likely to try to avoid police contact—even though doing so makes them appear culpable of something.” Without reasonable suspicion, Hummons’ search and seizure was unlawful. Under the exclusionary rule, illegally obtained evidence cannot be used at trial. Thus, the court ordered the evidence against Horton should be suppressed.

It might be tempting for liberals to view these cases through the lens of gun control and favor the state or for conservatives to see them as a question of law and order and support the officers. Both sides should resist the temptation. A rule that allows cops to search or seize individuals for carrying a gun can only lead to more brutality against young black men like Philando Castile. It also permits officers to trample upon our rights to property and self-defense. These are constitutional values, not partisan ones. And advocates across the ideological spectrum should urge the courts to follow the First District’s lead and reject the disastrous illogic now developing in the federal circuits.