Donald Trump threatened to “use power the likes of which the United States has never used before” against anyone who strikes America.
In a speech on the anniversary of the September 11 attacks, he said: “If anyone dares to strike our land, we will respond with the full measure of American power and the iron will of the American spirit and that spirit is unbreakable."
He added: "If for any reason they come back to our country, we will go wherever they are and use power the likes of which the United States has never used before and I'm not even talking about nuclear power.”
He was speaking 18 years after al-Qaeda hijackers commandeered four US commercial airliners and crashed them into the World Trade Centre, the Pentagon and a field in Shanksville, Pennsylvania.
Nearly 3,000 people were killed in the largest attack on American soil.
His comments came days after he called off peace talks with the Taliban, who hosted al-Qaeda leaders at they plotted 9-11.
His decision ended nearly a year of hopeful negotiations by a State Department envoy who said he was on the "threshold" of a peace agreement aimed at ending the conflict.
Mr Trump also said he visited the site of the towers, known as ground zero, shortly after they fell to assist first responders and those in need.
That claim has been disputed by Richard Alles, a retired deputy chief of the New York Fire Department, who has said the president “was not a presence” at the site.
The president's suggestion that he had "hundreds" of friends die at ground zero and that he witnessed television coverage of Muslims in the US cheering the destruction, cannot be verified.
- Read more
The moment of silence at the Pentagon is traditionally observed at 9:37 am, the time when a plane was flown into the building. But this year, the anniversary was observed 10 minutes late, at 9:47, as Mr Trump was running behind schedule.
“For the families who join us, this is your anniversary of personal and permanent loss," he told the crowd. "It’s the day that has replayed in your memory a thousand times over. The last kiss. The last phone call. The last time hearing those precious words, ‘I love you'.”
The president did not elaborate on who might strike America, but some commentators believe he was talking about the Taliban.
After the peace talks collapsed, it emerged he was preparing to hold talks with leaders of the terror organisation at Camp David in Maryland.
9/11: Trump repeats dubious claim that he was at ground zero
News of the plan to host Taliban leaders on American soil — particularly near a time as sensitive as the 9/11 anniversary — sparked a swift backlash from critics on either side of the political aisle, including Republican Liz Cheney, who said on Twitter: “No member of the Taliban should set foot [at Camp David]. Ever.”
The president began the day by observing a moment of silence on the South Lawn along with Melania Trump and White House staff.
He then moved on to the Pentagon where he delivered his speech.
Members of Congress held their own moment of silence on Capitol Hill. Vice President Mike Pence delivered remarks at a commemorative service in Shanksville.
Less than a month after 9-11, former President George W Bush announced on 7 October, 2001, that US and British troops had begun striking Afghanistan for harbouring the al-Qaeda terrorists blamed for 9/11.
The massive air campaign initially targeted troops, training camps and air defences of the Taliban, which had ruled Afghanistan under a harsh version of Islamic law since 1996 and hosted al-Qaeda leader Osama bin Laden.
For nearly a year, US envoy Zalmay Khalilzad has been negotiating with the Taliban on issues including a potential US troop withdrawal if the Taliban guarantees to keep Afghanistan from again becoming a launch pad for global terror attacks.
Support free-thinking journalism and attend Independent events
Those talks came to an abrupt halt last weekend when Mr Trump tweeted that he had cancelled the proposed meeting with the Taliban and members of the Afghan government.
Many fear his cancellation of negotiations will bring more carnage as the US and Taliban, as well as Afghan forces, escalate their attacks, with civilians in the crossfire.
It’s unclear if the US-Taliban talks will resume, but Mr Trump has said he wants to withdraw about 5,000 of the 14,000 US service members still in Afghanistan. More than 2,400 American service members have been killed in the conflict.
Additional reporting by Associated Press