In a solemn ceremony at the Pentagon’s Sept. 11 memorial, Defense Secretary Jim Mattis told families of those who lost their lives in the terrorist attacks 17 years ago that those deaths were not in vain, for in their passing they empowered the nation forever.

“Though evil visited us on a cloudless Tuesday morning, courage and strength answered amid the fire and smoke in New York City, over a Pennsylvania meadow, and in this very building, as innocent people from 91 countries were murdered on our soil,” Mattis said at a private ceremony under gray overcast skies.

[Read: Trump marks 9/11 anniversary at Flight 93 memorial: 'A piece of America's heart is buried on these grounds']

“We remember that hatred, disguised in false religious garb to murder innocents, will not prevail.”

Mattis promised to honor those who died “by living as they would have us live,” and said the U.S. military had kept faith by following “to the ends of the Earth those who sought to break our spirit.”

“If we in the U.S. Department of Defense do our best every day to protect America's promise to the world, then we keep our promise to them, to ourselves, and to future generations,” he said.

There was a moment of silence just before 9:37 a.m., the moment that American Airlines Flight 77 crashed into the building, killing 184 people, not including the five hijackers.

The names of all 59 who died on the plane and 125 in the Pentagon were read aloud, followed by the ringing of a bell for each of the victims.