Donald Trump has remembered the “band of brave patriots” aboard a September 11 flight that crashed in Pennsylvania, praising passengers and crew members who resisted hijackers and sent a message that the nation would “never, ever submit to tyranny”.

He honoured those killed 17 years ago in a field where the fourth airliner of the day crashed after those aboard realised what was happening and several passengers tried to storm the cockpit.

The president praised those who “took control of their destiny and changed the course of history”.

“A piece of America’s heart is buried on these grounds, but in its place has grown a new resolve to live our lives with the same grace and courage as the heroes of Flight 93,” he said.

“This field is now a monument to American defiance. This memorial is now a message to the world: America will never, ever submit to tyranny.”

Mr Trump listened as the names of the 40 victims were read aloud, followed by the tolling of bells.

He was joined in remembrances by first lady Melania Trump, Pennsylvania governor Tom Wolf and former governor Mark Schweiker, who was the state’s lieutenant governor on 9/11.

Donald Trump and first lady Melania Trump at the memorial service (Evan Vucci/AP)

Nearly 3,000 people died that day when other planes were flown into New York’s World Trade Centre and the Pentagon in an attack planned by al Qaida leader Osama bin Laden.

Bin Laden was killed in May 2011 during a US military operation ordered by Barack Obama.

Mr Trump, a New York native, made his first visit as president to the Shanksville site and paid tribute to the Americans who died.

Donald and Melania Trump, escorted by Stephen Clark, at the September 11 Flight 93 memorial in Shanksville (Evan Vucci/AP)

He said the site marks the “moment when America fought back”, and said the anniversary recalls the day “a band of brave patriots turned the tide on our nation’s enemies and joined the immortal ranks of American heroes”.

Mr Trump observed the solemn anniversary for the first time as president last year. He and the first lady led a moment of silence at the White House accompanied by aides and administration officials marking the time that hijackers flew the first of two planes into the World Trade Centre’s Twin Towers.

The president also participated in the Pentagon’s September 11 observance last year. Vice president Mike Pence represented the administration there on Tuesday.

Mike Pence speaks during the memorial at the Pentagon (Pablo Martinez Monsivais/AP)

The president was in his Trump Tower penthouse, four miles from the World Trade Centre, during the 2001 attacks.

He has a mixed history with September 11, often using the terrorist strikes to praise the response of New Yorkers to the attack but also making unsubstantiated claims about what he did and saw that day.

He has also accused fellow Republican George W Bush, who was president on September 11, of failing to keep Americans safe.

Mr Trump has said when talking about Muslims that “thousands of people were cheering” in Jersey City, New Jersey, across the Hudson River from lower Manhattan, as the towers collapsed.

There is no evidence in news archives of mass celebrations there by Muslims.

He has also said he lost “hundreds of friends” in the attack on New York City. He has not provided any names but has mentioned knowing a Roman Catholic priest who died while serving as a chaplain to the city’s fire department.