U.S. President Donald Trump marked his third 9/11 anniversary as president on Wednesday amid his growing frustration about what he calls the "endless war" in Afghanistan, where al-Qaida conceived the deadly 2001 attacks.

It has been 18 years since al-Qaida hijackers commandeered four U.S. commercial airliners and crashed them into the World Trade Center, the Pentagon and a field in Shanksville, Pennsylvania. Like Presidents Barack Obama and George W. Bush, Trump marked the day with the war still raging.

In a proclamation marking the anniversary as "Patriot Day," Trump reflected on how many Americans recall the moment when the terror group conducted the largest attack on American soil, killing nearly 3,000 people.

"A beautiful September morning was marred by stark disbelief, agonizing sorrow, and profound suffering," Trump said in a statement on Tuesday. "America's strength, courage, and compassion, however, never wavered."

The somber tone didn't last long though as Trump tweeted scathing attacks on a new Washington Post/ABC News poll, “Bonehead” Fed Chair Jay Powell and "Fake News."

Trump wrote, "If it weren’t for the never ending Fake News about me, and with all that I have done (more than any other President in the first 2 1/2 years!), I would be leading the “Partners” of the LameStream Media by 20 points. Sorry, but true!"

Wednesday's poll showed former Vice President Joe Biden leading Trump by 16 points among adults surveyed in a general election contest. It also showed Trump trailing Sens. Bernie Sanders, Elizabeth Warren and Kamala Harris by 12 points, 11 points and 10 points, respectively.

With the American flag flying atop the White House at half-staff, Trump participated in a moment of silence on the South Lawn with first lady Melania Trump and dozens of members of the executive branch. He then was heading to a commemoration at the Pentagon. Members of Congress held their own moment of silence on Capitol Hill. Vice President Mike Pence was to deliver remarks at a commemorative service in Shanksville.

Less than a month after the terror attacks, Bush announced on Oct. 7, 2001, that U.S. and British troops had begun striking Afghanistan for harboring the al-Qaida terrorists blamed for 9/11. The massive air campaign initially targeted troops, training camps and air defenses of the Taliban, which ruled Afghanistan under a harsh version of Islamic law from 1996 and hosted Osama bin Laden as he masterminded the Sept. 11 attacks.

For nearly a year, U.S. envoy Zalmay Khalilzad has been negotiating with the Taliban on issues including a U.S. troop withdrawal and Taliban guarantees to keep Afghanistan from again becoming a launch pad for global terror attacks. Those talks came to an abrupt halt last weekend when Trump tweeted that he had canceled a proposed meeting with the Taliban and members of the Afghan government at the Camp David presidential retreat in Maryland.

It's unclear if the U.S.-Taliban talks will resume, but Trump has said he wants to withdraw about 5,000 of the 14,000 U.S. service members still in Afghanistan. More than 2,400 American service members have been killed in the conflict.

The U.S.-led NATO combat mission ended in 2014, but the allied forces continue to train, advise and assist the Afghan security forces and conduct counterterrorism attacks against al-Qaida and Islamic State militants.

Majorities of Americans, including veterans, think the war in Afghanistan was not worth fighting, according to a May poll from Pew Research Center. Fifty-nine percent of all adults said the war in Afghanistan was not worth fighting, given the costs to the United States versus the benefits, while 36% said it was.

Opinion was similar among veterans specifically, with 58% saying the war was not worth fighting and 38% saying it was. Republican veterans were more likely than Democratic veterans to say the war in Afghanistan was worth fighting, 46% versus 26%, though even Republican veterans were divided in their assessment.

Trump campaigned for president on a pledge to withdraw U.S. troops from Afghanistan.

The top Democrats vying for the nod to challenge Trump in 2020 also have called for the removal of U.S. troops, though they have offered different timetables and parameters for any such withdrawal.

Former Vice President Joe Biden and Massachusetts Sen. Elizabeth Warren have said they would ensure American combat forces return from Afghanistan during their first term, while California Sen. Kamala Harris and Vermont Sen. Bernie Sanders have lauded that timeframe but stopped short of full commitment to it.