Esper said the U.S. was still gathering information about the explosion, but said most believe "it was an accident, as reported."
On Tuesday, Trump said, "It looks like a terrible attack."
Trump was asked why he called it an attack and not an accident, especially since Lebanese officials had not yet determined the cause of the explosion. He told reporters at the White House: "It would seem like it based on the explosion. I met with some of our great generals and they just seem to feel that it was. This was not a - some kind of a manufacturing explosion type of a event. ... They seem to think it was an attack. It was a bomb of some kind, yes."
From the outset, U.S. officials have said that they did not know the cause of the initial fire and explosions that set off the larger blast. But they say they do believe the reports out of Lebanon claiming a large stockpile of ammonium nitrate left over from a seizure is what exploded.
RELATED: Lebanon putting some port officials on house arrest after Beirut explosion
Officials on Wednesday couldn't identify any "generals" who delivered any such Beirut message to the president. And while none would comment publicly, some noted that defense and intelligence officials didn't have enough information about the explosion to make any statement about the cause on Tuesday evening.
This is not the first time defense officials have been caught off-guard by Trump or scrambled to try to explain something he said without appearing to contradict their commander in chief.
Early in his presidency, Trump announced on Twitter that he was going to ban transgender service members, a move Pentagon leaders didn't know about. And many were caught by surprise when he suddenly announced he was pulling all troops out of Syria.
More recently, defense officials struggled to explain what Trump meant when he suggested the military was planning to play a role in distributing the coronavirus vaccine, something they had no plan to do. And they openly split with the president when he said he wanted to invoke the Insurrection Act and deploy troops to tamp down protests in the wake of the death of George Floyd.
From video and other evidence, experts suggest that fireworks and ammonium nitrate were the fuel that ignited the explosion that rocked the Lebanese capital. The scale of the damage - from the area of the explosion at the port of Beirut to the windows blown out miles away - resembled other blasts involving the chemical compound commonly used as an agricultural fertilizer.
The compound typically does not detonate on its own and requires another ignition source. That likely came from a fire that engulfed what initially appeared to be fireworks stored at the port. The Lebanese government said it was putting an unspecified number of Beirut port officials under house arrest pending an investigation into how 2,750 tons of ammonium nitrate came to be stored at the port for years.
"It's obviously a tragedy," Esper said online during this year's Aspen Security Forum. "You know, we mourn for the dozens, if not hundreds, of Lebanese possibly killed and thousands hurt. ... When you see the video, it's just devastating."
Esper said the U.S. was preparing to provide humanitarian aid and medical or other supplies to the Lebanese people.
The U.S. Embassy in Beirut said at least one American citizen was killed and several more were injured in the explosion. "We are working closely with local authorities to determine if any additional U.S. citizens were affected," the embassy said in a statement Wednesday. The embassy said all its employees are safe and accounted for.
Secretary of State Mike Pompeo spoke Wednesday with Lebanon's Prime Minister Hassan Diab to convey U.S. condolences to the Lebanese people, according to State Department deputy spokesperson Cale Brown.
PHOTOS: Aftermath of explosions in Beirut, Lebanon