Only those who have stood close to the devastating impact of terror will know how deep the immediate shock and fear runs. I saw the horrendous effects in Norway this July — just as Americans saw them in New York and Washington 10 years ago. Traveling the world for the United Nations and the Red Cross I witnessed the way massive ongoing terror affects society, from Iraq to Afghanistan and from Colombia to Israel, the West Bank and Gaza. In the aftermath of a deadly terror attack, a shocked and confused public will always turn to its leaders for answers.

We know what the right answer is. The effective way to confront terror is to reaffirm the values that terrorists want to tear down. The wrong answer is to go over to the “dark side” and fight terror in ways that violate our most basic human rights. The recent discovery by Human Rights Watch in archives in Tripoli of documents that appear to detail how the United States and Britain handed over suspects to Muammar el-Qaddafi’s torturers again underscores the folly of sacrificing our principles in the name of security. The consequences of the American and European breakdown in principled leadership after the 9/11 atrocities will not go away until there has been accountability for the torture and the abuse of detainees.

Confronting terrorism means rigorous, well-resourced and global efforts by police and intelligence services to prevent attacks and bring to justice criminals of the worst kind. It should never mean arbitrary arrests, secret detention and rendition of detainees to tyrants and torture. But this is exactly what happened when American and European leaders willingly left the moral high ground and the legitimacy of lawful response, and instead bent and broke the same international laws that previous leaders had worked for generations to enshrine.

There still has been no real accountability anywhere for the criminal acts that sent terrorism suspects, some certainly guilty and some innocent, from one torture chamber to the next in Europe and the Middle East.

It does not have to be like this. After the massive terrorist attacks in Oslo this summer, the Norwegian leadership, the victims and the general public were remarkably unanimous in declaring that the best response was a vigorous rally around democratic values and the rule of law. After a mass murderer massacred youth leaders and smashed central government buildings — unleashing terror that had not been seen since the Nazi occupation in the 1940s — Norwegians looked for guidance and got it.

From the king and the prime minister, down through the ranks of government and political opposition, the mantra has been that the liberal values of freedom of expression and tolerance are the way to confront terror. There is consensus that this is not a contest to see which side can better break the other — it is a question of proving to everyone that we offer a better alternative — and thus can prevent the recruitment of new terrorists.

Will the Norwegian model trump the many previous examples of terror being met with unlawful and counterproductive methods? The threat from an international group like Al Qaeda is different from that of a domestic terrorist — and no one will know how Norwegians would have reacted had the attack been the work of Islamist extremism instead of home-grown, right-wing extremism.

But the lessons of a decade of terror remain the same: it was a betrayal of our deepest values when our leaders agreed to hand over secret prisoners to the likes of Qaddafi, Bashar al-Assad and Hosni Mubarak, and when some of our countries’ top lawyers bent the law to see how our intelligence services could get away with torture.

This stain will not go away unless there is a criminal investigation of the top Bush administration officials who authorized these crimes.

It is equally important for European officials who actively participated in the C.I.A. programs of rendition, secret detention and abusive interrogation techniques to be fully investigated and prosecuted. Until that happens, the issue will haunt successive U.S. and European governments each time the archives of a tyrant is uncovered and the hypocrisy is exposed.

The best way to honor the victims of terrorism is to prove that we represent a better alternative. It is all a question of leadership. The moral high ground means never opening the torture chamber.

Jan Egeland is Europe director at Human Rights Watch and the former U.N. under-secretary general for humanitarian affairs and Norwegian secretary of state for foreign affairs.