U.S. President Barack Obama on Sunday urged Americans not to let the efforts of extremist groups divide his country along religious or ethnic lines as he marked the 15th anniversary of the attacks on Sept. 11, 2001.

"Groups like al-Qaeda, like ISIL, know that they will never be able to defeat a nation as great as America, so instead they try to terrorize in the hopes they can stoke enough fear that we turn on each other, that we change who we are or how we live," Obama said.

92257267

A child pauses during Sunday's commemoration ceremony in New York for the victims of the Sept. 11, 2001 attacks. (Getty Images)

Speaking during a memorial ceremony outside the Pentagon, one of the targets, Obama said Americans should reaffirm their "character as a nation," and "as people drawn from every corner of the world, every colour, every religion, every background."

"In the end, the most enduring memorial to those we lost, is ensuring that America that we continue to be, that we stay true to ourselves, that we stay true to what's best in us, that we do not let others divide us."

Americans "don't give into fear," he said, adding, "We will preserve our freedoms and the way of life that makes us a beacon to the world."

'Live up to the sacrifice'

"We have the opportunity each and every day to live up to the sacrifice of those heroes that we lost."

In New York, Democrat Hillary Clinton and Republican rival Donald Trump took a break from campaigning for the U.S. presidency to quietly mark the anniversary, without making any statements in public.

The two were at the Ground Zero Memorial as people gathered to observe a moment of silence at 8:46 a.m. ET, the moment one of the planes used in the attacks struck the World Trade Center's North Tower.

As they do every year, the families of the victims read the names of their lost loved one, in pairs, pausing for another moment of silence at 9:03 a.m., when a second airliner struck the South Tower.

"It doesn't get easier. The grief never goes away. You don't move forward — it always stays with you," said Tom Acquaviva, of Wayne, New Jersey, who lost his son Paul Acquaviva.

9/11 anniversary

A single ring of a bell marked the start of the memorial ceremony in New York. (CBC)

No public officials spoke at the New York ceremony, in keeping with a tradition that began in 2012. The 9/11 Memorial Museum, which sits in the plaza surrounded by white oak trees, will be open on Sunday only to family members of the victims.

Hundreds of people were expected at a ceremony at the Flight 93 National Memorial in Shanksville, Pennsylvania, close to where a hijacked passenger jet slammed into a field 15 years ago.

While the vast majority of 2,983 victims were Americans, there were 372 foreign nationals from 61 countries among those killed, including 24 Canadians. More than 400 emergency workers in New York were killed.

9/11 15th anniversary

The hours-long reading of the names of the dead took place at the memorial plaza in New York City. (CBC)

The anniversary was also observed by officials and cities in Canada.

"I think every Canadian knows where they were and what they were doing on that day," Defence Minister Harjit Sajjan told CBC News, noting he was just finishing a shift with Vancouver police at the time.

Sajjan noted the mood in Vancouver was "very sombre" but also "very resolute in terms of showing solidarity with our American friends and colleagues."

Several events marking the anniversary of the 9/11 attacks were to be held on Sunday in Gander, N.L. The city took in nearly 7,000 plane passengers when all flights across North America were grounded on the day of the attacks.

Mayor Claude Elliott remembers how the town of 9,600 in 2001 almost doubled its population overnight as it cared for passengers who were stranded for five days.

Defence Minister Harjit Sajjan remembers 9/115:46

Gander 'put everything into action'

"It was only natural for us to look after people who were in need of love and compassion and food and clothing," he told CBC. "And we did that."

It was probably 26 or 27 hours after the planes landed that officials in Gander realized that passengers would not be allowed to fly home for a while.

"So we decided then that we had to make plans, and that's when we put everything into action to make sure we had places for people to go, to sleep, to stay. And we used every service group in Gander, every church and school and everything, because we had to keep the hotel rooms for the crew, because we wanted them well rested when they were ready to leave."

Clinton 9/11 15th anniversary

Hillary Clinton attends the anniversary ceremony on Sunday at the site where the World Trade Center was destroyed on Sept. 11, 2001. A Clinton spokesman said she left the ceremony early after feeling 'overheated.' (CBC)

U.S. Consul General Steven Giegerich and Premier Dwight Ball were to join thousands of others at an ecumenical service that will also raise awareness about post-traumatic stress disorder. A foundation named for a firefighter who died trying to rescue people from the twin towers has sent a piece of steel beam from the South Tower to Gander as a thank-you gift.

"Today, we mark the 15th anniversary of the terrorist attacks in the United States that killed nearly 3,000 innocent victims – including 24 Canadians," Canadian Prime Minister Justin Trudeau said in a statement.

Trudeau said he wanted to offer, "heartfelt support to those still struggling with the physical and emotional injuries they sustained on 9/11."

"While 9/11 will long be remembered as a day of destruction and terror, let us also remember it for the remarkable humanity that was shown in such a tragic time. May we never forget the countless Canadians, from coast to coast to coast, who opened their hearts and their homes to those affected by the attacks," he said.

92257638

Donald Trump, left, and New Jersey Gov. Chris Christie also attended the ceremony in New York. (Justin Sullivan/Getty Images)

Organizers in the U.S. planned some additional music and readings on Sunday to mark the milestone year. But they were keeping close to what are now traditions: moments of silence and tolling bells, an apolitical atmosphere and the hours-long reading of the names of the dead.

"This idea of physical transformation is so real here," Sept. 11 memorial President Joe Daniels said this week. But on this Sept. 11 itself, "bringing the focus back to why we did all this — which is to honour those that were lost — is something very intentional."

Financial and other hurdles delayed the redevelopment of the Trade Center site early on, but now the 9/11 museum, three of four currently planned skyscrapers, an architecturally adventuresome transportation hub and shopping concourse and other features stand at the site. A design for a long-stalled, $250-million performing arts centre was unveiled Thursday.

Around the Trade Center, lower Manhattan now has dozens of new hotels and eateries, 60,000 more residents and ever-more visitors than before 9/11.

With files from CBC News and Reuters