A newly built section of the U.S.-Mexico border fence opposite the Mexican border city of Ciudad Juarez. (Jose Luis Gonzalez/Reuters)

Juliette Kayyem, a former assistant secretary at the Department of Homeland Security and former Massachusetts homeland security adviser, is faculty chair of the homeland security program at Harvard’s Kennedy School of Government.

What happens when, after 2001, you focus your entire homeland security apparatus solely to stop the next 19 terrorists from getting on four airplanes and killing thousands of Americans?

The answer, in some ways: the government’s disastrous response to Hurricane Katrina in 2005.

Katrina was a lesson in what can go wrong when we lose sight of a big, complicated mission: protecting the American people. Which is why, after 2005, the Department of Homeland Security and its state and local partners began to adopt an “all hazards” approach to protecting our communities. Instead of focusing on just one threat, America would be safer if we sought to reduce the threat of all highly probable risks across the board: climate change and oil spills, terrorism and cyberattacks, pandemics and unlawful immigration. This didn’t mean we should focus on anything that might go wrong; we don’t need to devote dollars, for example, to prevent the 100 or so selfie-related deaths that occur each year. We just need to focus on our most probable vulnerabilities.

So over the next decade, DHS nurtured and funded the preparedness and response capacities of our first responders so they could be ready for any, and all, vulnerabilities. The thinking was simple: Those capacities will be relevant whether the harm is caused by a terrorist, a hurricane or a cyberattack.

As President Trump continues his attacks on the leaders, policies and personnel at DHS because of his administration’s failure to curb border crossings, the deeper harm to our security is his reversal of that all-hazards course correction. DHS is once again focused on one risk at the exclusion of the others. Any nation that puts its entire weight behind just one security challenge (and steers dollars from other security needs, such as the military) is letting other vulnerabilities go unaddressed and ignored.

There is no question that border enforcement is an essential security priority. But homeland security requires a constant balancing of risk and reward. How do you have a perfectly safe Boston Marathon? Easy: Don’t have one. How do you have borders with no risk? Close them. But an absolutist approach doesn’t work in a modern democracy, as the president realized when he backed away from his threat to close the borders last week.

Our homeland security is a continuing exercise in managing the safe and secure flow of people, goods, ideas and networks. “Secure flow” means both are in balance. Across our nation, everything must move: an urban transit system, a busy southern port, agricultural goods from the heartland that must reach their markets, a round-the-clock international aviation network. Movement creates vulnerabilities, but those risks are a reflection of what makes us a vibrant nation, not a negligent one.

And while the border has come to be the lens by which we view DHS, the irony is that it is borderless threats that pose the greatest challenge to our homeland. These other risks — climate change, pandemics, cyberattacks and terrorism — make our homeland vulnerable because they do not have a single locus of entry. In other words, there is nothing to close to keep these threats out.

On these other all-hazards fronts, the White House’s policies have ranged from negligence to denial. The president refuses to acknowledge the rise of right-wing extremism, which is a larger terrorism threat here at home than radical Islam. Trump raises skepticism about vaccinations, just when preventable measles outbreaks burden our local and state public-health departments (and New York City just declared a measles emergency). The president’s response in Puerto Rico, and his continuing failures to support its recovery, suggest he sees no responsibility for the federal government in climate disasters. And, most significantly, Trump continues to doubt the Russian cyberattacks on our, and other nations’, democratic elections.

And as if to make it clear that the White House doesn’t particularly view homeland security as a priority outside the immigration and wall debate, the president has also minimized the role of his homeland security and counterterrorism adviser, downgrading the post from equal status to below national security adviser John Bolton.

Managing our homeland security, and the department with that name, are tasks both complicated and existential. They cannot be ignored away.