NEW YORK — With solemn ceremonies and prayers, moments of silence and the ringing of bells, the nation on Sunday marked the 15th anniversary of the Sept. 11 terrorist attacks that claimed the lives of 2,977 victims and forever changed how the United States views itself and its place in the world.

Commemorations unfolded in New York and outside Washington, where hijackers piloted planes into the World Trade Center and Pentagon, and in a rural field in Pennsylvania, where Flight 93 crashed after passengers fought back against their hijackers.

“As Americans, we do not give in to fear,” President Barack Obama said at the Pentagon Memorial service as about 800 family and friends of those who died stood for 30 seconds of silence at 9:37 a.m. ET, the same time that a jetliner struck the building and killed 184 people.

Democratic presidential nominee Hillary Clinton and Republican nominee Donald Trump attended the ceremony in Lower Manhattan, but Clinton left early and appeared to stumble as she approached her vehicle. The campaign later issued a statement from Clinton's doctor saying she had been diagnosed with pneumonia on Friday and was recovering from it.

The New York ceremony started with a moment of silence at 8:46 a.m. ET, coinciding with the time the first plane struck the north tower. Some bowed their heads while others held high the photos of their loved ones.

Then began the process of reading out the names of the victims. Family members came to the stage in pairs to read them out and sometimes add a heartfelt message.

Dennis Scauso was one of 343 New York City firefighters who died trying to save people at the World Trade Center; his remains were never found. His relatives came to the ceremony as they do every year, finding comfort in the company of others who lost loved ones in the attack.

“It's all very beautiful because you are surrounded by people who are going through and feeling the same thing you are going through,” said one of his sisters, Nancy Shakouri.

The New York remembrance was a private event attended by families and local officials.

At the Pentagon ceremony in Arlington, Va., a large American flag hung from the roof of the building where American Airlines Flight 77 barreled into the limestone facade.

Defense Secretary Ash Carter and Chairman of the Joint Chiefs of Staff Gen. Joseph Dunford joined Obama in placing a wreath of white lilies in the memorial garden, and a military band played “America the Beautiful.”

“The most enduring memorial ... is ensuring the America we continue to be, that we stay true to ourselves, stay true to what is best in us, that we not let others divide us,” the president said.

Abraham Scott, 64, came to the Pentagon with his two daughters, two granddaughters and many other relatives and friends.

His wife, Janice Marie Scott, was working as a budget officer at the Pentagon on the morning of the attacks.

For years, Scott sat in monthly therapy sessions with other families of people killed at the Pentagon. He talked about his wife's death and how it upended his family's life.

“My desire to hate has gone,” Scott said. “I turned hatred into a means to keep their memory alive.”

At the Flight 93 National Memorial in southwestern Pennsylvania, the ceremony included music, the reading of the names of the 40 victims who died there and the ringing of bells.

With the anniversary falling on a Sunday, the NFL also held observances, including a recorded video message from Obama.

Vice President Joe Biden participated in a pregame national anthem ceremony in Philadelphia before the Eagles' game against the Cleveland Browns. Former President George W. Bush and his wife, Laura, appeared at the Cowboys-New York Giants game in Dallas.

Many smaller tributes were scheduled around the country.

In Manhattan, tourists crowded the memorial fountains built into the footprints of the two original World Trade Center towers.

Among the visitors was Greg Brierley, 49, of Milan, Mich., a retired firefighter who said he came to the site to remember the first responders killed on Sept. 11.

“We're all brothers and sisters,” he said.

Vera Haller, a special correspondent, reported from New York and Brian Bennett from Arlington.

brian.bennett@latimes.com