Trump, making brief remarks to reporters after landing in Palm Beach, Fla., showed reporters a map comparing Iraq and Syria at the height of Islamic State power in 2014 with today.
“That’s what we have right now,” he said, indicating areas no longer controlled by the militants.
The announcement, more than four years after the United States launched its first airstrikes against the then-formidable militant group, follows months of speculation about when U.S.-backed Syrian forces would capture the Islamic State’s final foothold in eastern Syria.
Neighboring Iraq declared victory over the group in late 2017.
But the White House statements were immediately contradicted by reports from eyewitnesses and local forces in eastern Syria, where the U.S.-backed Syrian Democratic Forces (SDF) have struggled to root out militant holdouts who are dug in among civilians.
Mustafa Bali, a spokesman for the SDF, said the fighting had not eased up around the village of Baghouz, which has been the scene of an intense battle against those holdouts.
“Heavy fighting continues around mount #Baghouz right now to finish off whatever remains of ISIS,” he said in a message on Twitter.
A U.S. military official, speaking on the condition of anonymity because he was not authorized to comment publicly, said the SDF was still working “to clear pockets of ISIS from caves under Baghouz.”
The official said there appeared to be a few hundred militants remaining around Baghouz.
Photographs from the area showed the night sky lit up with tracer rounds.
The militants appeared to be pinned down along a cliff near the Euphrates River as they mount a desperate final stand.
More than 50,000 people have left the enclave since January, surprising military planners who have repeatedly believed the area to be almost empty.
On Thursday, the International Rescue Committee said that thousands more civilians could follow in the coming days.
“These women and children are in the worst condition we have seen since the crisis first began,” said Wendy Taeuber, the group’s Iraq and northeast Syria country director.
The Pentagon did not immediately provide an explanation for the apparent disconnect between the White House depiction and reports from eastern Syria.
Trump, who has been eager to end the U.S. military mission in Syria, has repeatedly suggested in recent months that a final victory was imminent, only to have the fighting drag on.
In December, Trump made another victory declaration as he announced, in a surprise move, that he would pull out all 2,000 U.S. troops from Syria.
In the following weeks, the president appeared to back away from that victory claim as top advisers warned that an abrupt departure from Syria would alienate allies and jeopardize gains against the militants.
The Pentagon now plans to keep at least 400 troops in Syria to help the SDF and other allies maintain security in former Islamic State strongholds.
While a conclusion to the operation would be a milestone for the Pentagon, officials expect the group will seek to mount continued insurgent attacks in Syria, as it has in Iraq.
Sanders said Trump had been briefed during his flight by acting defense secretary Patrick Shanahan.
Shanahan joins Trump at his exclusive Mar-a-Lago resort as the president considers nominating the former Boeing executive to the top Pentagon job.
It was not immediately clear whether Shanahan conveyed to Trump that the Islamic State had been ejected from Baghouz, or whether Trump or Shanahan were aware of the assessment from Syrian and U.S. forces in the region.
Loveluck reported from London. John Wagner in Washington contributed to this report.