US President Donald Trump has described as a "slimeball" a journalist who quoted him as saying dead US soldiers were "losers" and "suckers".
He likened The Atlantic magazine report to unproven accusations made against him of colluding with Russia to win the presidential election of 2016.
The damning quotes were confirmed independently by the Associated Press.
Veterans' groups are among those condemning Trump, less than two months from the 2020 election.
Progressive group VoteVets posted a video of families whose children had been killed in action. "You don't know what it is to sacrifice," says one.
Paul Rieckhoff of the Iraq & Afghanistan Veterans of America, tweeted: "Who is really surprised by this?"
A small group of protesters waved placards at the president's motorcade yesterday near the Trump National Golf Club in Virginia.
Trump has often staked a claim to strong support among the military, and last year Pew Research Centre found that veterans were generally supportive of him as commander-in-chief, with 57 percent in favour. Three-fifths of the veterans identified as Republican, the research found.
Dead labelled 'losers', 'suckers'
According to The Atlantic, when Trump cancelled a visit to the Aisne-Marne American Cemetery outside Paris in November 2018, 100 years after the end of World War 1, he said it was "filled with losers".
Four sources told the magazine he had rejected the idea of visiting because the rain would dishevel his hair, and he did not believe it important to honour America's war dead.
During the same trip, the president also allegedly referred to 1800 US soldiers who died at Belleau Wood as "suckers". The battle helped to prevent a German advance on Paris during World War 1 and is venerated by the US Marine Corps.
The Atlantic's reporting was based on anonymous sources but a "senior Defence Department official with first-hand knowledge of events" and a "senior US Marine Corps officer who was told about Trump's comments" confirmed the cemetery comments to AP.
In 2018 the White House said the cemetery visit had been cancelled because bad weather had grounded the president's helicopter. This account was backed up in a recent book by President Trump's former national security adviser, John Bolton, who has been a vocal critic of Trump.
In response to a request under the Freedom of Information Act from Buzzfeed reporter Jason Leopold the US Navy also said it cancelled the trip to the cemetery because of rain.
How did Trump react?
Without referring to Jeffrey Goldberg, the author of The Atlantic report, by name, he tweeted: "You work so hard for the military, from completely rebuilding a depleted mess that was left by OBiden [the previous presidential administration when Joe Biden was vice-president to Barack Obama], to fixing a broken V.A. and fighting for large scale military pay raises, and then a slimeball reporter, maybe working with disgruntled people, makes up such a horrible charge.
"This reminds me of the Dirty Dossier [the Steele dossier which alleged collusion with Russia], which was pushed hard by John McCain, & then with a thud turned out to be a total fraud. So many other scams also. The Radical Far Left is VICIOUS, they will do or say anything to win. But they won't, we will WIN, & have four great years!"
Trump went on to attack another journalist, Jennifer Griffin of Fox News, normally one of the president's favourite news outlets.
Griffin had reported disparaging remarks about the US military allegedly made by Trump on other occasions such as calling soldiers who fought in the Vietnam War "suckers".
"Jennifer Griffin should be fired for this kind of reporting," Trump tweeted. "Never even called us for comment. @FoxNews is gone!"
White House officials have either denied the remarks allegedly made on the trip to France or stressed the president's respect for the military.
What are Trump's opponents saying?
Biden, the Democratic challenger in the 3 November election, said his rival was "unfit" to lead.
"Mr President, if you don't respect our troops, you can't lead them," he tweeted.
If elected, he said, he would "ensure that our American heroes know that I will have their back and honour their sacrifice. Always".
Democratic Senator Tammy Duckworth, a veteran who lost both legs while serving in Iraq, said President Trump "liked to use the US military for his own ego".
Khizr Khan, the father of a US soldier killed in Iraq who criticised Trump during the 2016 Democratic convention, joined Duckworth on the call.
He said: "When Donald Trump calls anyone who places their lives in service of others a loser, we understand Trump's soul."
Where do Trump and the US military stand?
There have been previous spats and controversies.
Trump caused outrage by saying the late Senator John McCain, a prisoner of war in Vietnam, was not a "war hero" saying: "I like people who weren't captured."
The president has never served in uniform. He received five deferments from a military draft during the Vietnam War - four for academic reasons and one for bone spurs, a calcium build-up in the heels.
Joe Biden received five student draft deferments during the Vietnam War before being disqualified from serving in the military because of asthma as a teenager.
- BBC