In the wake of the Paris attacks, once again we debate how to preserve liberty in a time of terror. The CIA Director demands more surveillance. Some Republican presidential candidates propose to shut down mosques or impose religious litmus tests on refugees. With the proliferation of weapons, social media, and sociopaths, the danger over the next decades will only increase. How do we fight terrorists without sacrificing civil rights? Here is a constitutional checklist of what we can and cannot do:

What We Cannot Do

Religious Profiling: Even if every terrorist in the world were Muslim (many, of course, are not—remember Timothy McVeigh, the Unabomber, Anders Breivik), over 99% of Muslims are not terrorists. That’s over 1.5 billion people no more responsible for the horrors of Paris, Madrid, or 9/11 than Mother Teresa. It is easy to support profiling when you are not in the group being profiled. Closing down mosques, or targeting people based on religious belief, would not only violate the First Amendment right to free exercise of religion, but also alienate millions of law-abiding Americans.

Mass Surveillance: After 9/11, Presidents Bush and Obama authorized the NSA to spy on millions of Americans. Edward Snowden revealed the phone metadata program, in which the NSA tracks billions of phone calls made by hundreds of millions of Americans. The NSA also intercepts the content of millions of domestic communications. (Nine years ago, I filed a still-pending class action lawsuit to stop that program.) There is little evidence that turning the awesome spying apparatus of the NSA on the American people prevents terrorism. But even if spying on 300 million Americans unearthed some terrorist somewhere, what is the cost? The Fourth Amendment prohibits the government from rummaging through our files, records, emails, texts, and calls without good cause and a judicial warrant. American independence—John Adams famously declared—was itself born of arbitrary general searches by the British. To those who would sacrifice privacy rights because they have “nothing to hide,” should we sacrifice the right to free speech because some have “nothing to say”? Privacy matters. Let’s not hand Big Brother the keys to our innermost thoughts, most intimate conversations, and every last click on our computer.

Denying Access to Justice: Citing national security, courts have repeatedly dismissed legal challenges to alleged kidnapping, detention, and even torture by the United States government. Just last month, a Washington, D.C. appeals court ruled that Amir Meshal, an American wrongfully kidnapped and imprisoned abroad by the FBI, had no legal right to sue the federal government. These cases are troubling. When the United States government brutalizes innocent people, the government has to be accountable. Without accountability, the rule of law means nothing.

Torture violates the Constitution and international law. It is a major recruiting tool for our enemies. And it doesn’t work. As John McCain put it, torture victims “will say whatever they think their torturers want them to say.” Banning torture is legally required and good policy.

What We Can Do

Declare War: Every nation has the right to defend itself. But under the Constitution, only Congress has the “power . . . to declare war.”  If we are fighting a war against ISIS, Congress must vote and say so.

Kill American Terrorists on the Battlefield: The government has the right to target American terrorist leaders, in enemy territory, actively engaged in a war against the United States. Accused terrorists captured on American soil—Boston Marathon bomber Dzhokhar Tsarnaev for example—are constitutionally entitled to due process: lawyers, juries, the presumption of innocence. But nothing in the Constitution requires American soldiers to risk their lives to capture an alleged terrorist in Yemen or Afghanistan.

Targeted Spying of potential terrorists, with probable cause and a warrant, is legal and effective. The Foreign Intelligence Surveillance Court exists to issue these warrants.

Control the Border: We are a proud nation of immigrants, but nothing in the Constitution prevents us from securing our borders and screening visitors—refugees, students, tourists, anyone—with a fine-tooth comb.

Work With Communities to Root Out Terrorists: Law enforcement can and should work with religious leaders to root out radicals and terrorists. But if a leader spews hate and advocates violence, that provides a legal basis to go undercover, infiltrate, and look for potential terrorists.

Presidents often say their first responsibility is to protect the nation. But the President-elect takes an oath to “preserve, protect, and defend the Constitution of the United States.” The Constitution, not the country. The Constitution created the presidency, the Congress, the courts, and the United States itself. In a nation built on principles—not ethnicity, race, creed, or even culture—the Constitution remains our North Star.

It is possible to preserve constitutional rights and fight terror at the same time. We have to. If we sacrifice American ideals, who will we become? That is a question I hope we never have to answer.