Comparing Islamic radicalism to communism, Homeland Security Secretary Michael Chertoff warned Yale students Monday that the United States will have to be on guard against the threat of terrorism for at least a generation.

In a public address at the Yale Law School, Chertoff painted the threat of terrorism as a matter that can be best overcome by winning hearts and minds — and something that will not come quickly or easily.

“We have to engage at the level of the ideology itself,” Chertoff told his audience. “We have to enable those who struggle against dangerous ideologies to have a voice.”

“We have to encourage the communities that are communities of moderation and believe in the rule of law to get out there and get into the battlefield of ideas,” he continued, “because if we cede the battlefield of ideas only to those who are extremists, then we are giving them the most powerful weapon to recruit the next generation of terrorists.”

Over the course of an hour Monday afternoon, in a veritable survey of warfare and terrorism from America’s founding, Chertoff wandered from the threat of the British empire against the young American confederacy to the power of a single rogue dissenter in the 21st century to kill thousands or even hundreds of thousands through the use of biological or chemical weapons.

“I’ve laid out what some of you may think is a grim scenario about what we face in the world,” he acknowledged. “On the one hand, the Cold War is gone … . On the other hand, we have a much more disorderly set of threats, much more networked, much more widely distributed, much more difficult to deter and, unfortunately, much better enabled to carry out acts of violence.”

Chertoff, channeling University President Richard Levin, said global exchanges — through education, through foreign aid, through visiting abroad and accepting visitors at home — can help encourage the kind of tolerant ideology that will smother the hate propagated by extremists. To reinforce his point, he called on Congress to pass a controversial free-trade agreement with Colombia.

“This is not a military battle,” Chertoff said. “It’s an economic battle, and it’s one in which if we allow ourselves to be fully engaged by signing the free-trade agreement … we’re going to show that we’re not going to talk the talk until we walk the walk, and that’s going to have the best possible chance of affecting developments in South America in a favorable way.”

The Harvard-educated Chertoff, who previously served as a judge on the U.S. Court of Appeals for the Third Circuit and as assistant attorney general for the Criminal Division at the Department of Justice, joined the cabinet of President George W. Bush ’68 in 2005.

His lecture Monday, “Confronting the Threats to Our Homeland,” was the keynote address of a colloquium highlighting the Heyman Federal Public Service Fellowship Program, which was created in 2006 to provide Law School graduates the opportunity to explore careers in public service by working closely with high-ranking U.S. government officials for a year after they depart New Haven.

To close the talk, Law School Dean Harold Hongju Koh said what many in the audience later indicated they were thinking: “All of us who are feeling sorry for ourselves about how hard our jobs are now feel like we have easy jobs compared to you.”

Chertoff, for his part, emphasized in his remarks that his field of work, however frightening, is an utterly necessary one. What some critics dismiss as fear-mongering is anything but, he said.

“Sometimes the things we’re afraid about are unpleasant to talk about; sometimes what we need to do to address those fears are difficult and challenging,” Chertoff said. “But what doesn’t make sense is to close your eyes because they’re too hard to think about … . These problems will not go away by themselves.”