The following narrative is based on President Donald Trump’s comments, national security adviser Robert O’Brien’s comments on "Meet the Press," and NBC News reporting from multiple U.S. officials familiar with the raid.

WASHINGTON — At around 5 p.m. Saturday, President Donald Trump and his top national security officials gathered in the White House situation room to watch what would be the most consequential military operation of his presidency so far.

The day before, Trump had given the order to launch a raid to capture or kill the founder and leader of ISIS, Abu Bakr al-Baghdadi, after options were presented to him on Thursday.

The world's most-wanted terrorist had taunted the Americans in a September audio message proving he was still at large, six years after the U.S. began hunting him. But now, thanks in part to information from the same Syrian Kurdish allies Trump is accused of abandoning, U.S. analysts believed they had found him.

The CIA had been honing the intelligence for weeks. The man believed to be al-Baghdadi was under U.S. surveillance, and his movements were being tracked.

The American commandos who conducted the operation had been staging in the region since last month. Some of them were launched from the Iraqi Kurdish city of Irbil, which was liberated from Saddam Hussein in 2003 in a war Trump says was a terrible mistake.

Trump was presented with a different set of circumstances than President Barack Obama was when he decided to launch the raid into Pakistan that killed Osama bin Laden. Back in 2011 the CIA wasn't sure bin Laden was there, and the Pakistanis were not told. If the tall man in that compound wasn't bin Laden, it would have been a hard thing to explain. If the Pakistanis defended their territory, there could have been a bloodbath.

In this case, there was no hostile force nearby, given that Trump had received acquiescence from the Russians and Turks, who controlled some of the airspace the U.S. needed to fly through. But the president still had to greenlight a risky operation that could get Americans killed. That was his biggest concern, he said later, and he was gratified that no American was injured, though a military dog was wounded.

Download the NBC News app for breaking news and politics

Trump knew what it was to send men to their deaths; a Navy SEAL was killed during a raid in the first month of his administration in Yemen.

This was not the first attempt to get the ISIS leader. Two or three previous launches had been canceled, Trump said, because al-Baghdadi changed his mind about where he was headed.

The strong implication was that the U.S. either had a human source in his entourage or was monitoring his communications.

"Finally we saw that he was held up here. We knew something about the compound," Trump told reporters at the White House Sunday.

There was a tunnel that could have allowed an escape, but "we had that covered," Trump said. Breaking with past precedent, the president decided against briefing all congressional leaders in advance of the operation, because he was concerned it would leak.

The helicopters lifted off moments after the White House meeting assembled. Trump and his team — including Vice President Mike Pence, national security adviser Robert O'Brien and Gen. Mark A. Milley, the chairman of the joint chiefs of staff — watched a video feed with a definition that the president said was as clear and detailed as one might see in a mall cineplex.

"Absolutely perfect, as though you were watching a movie," Trump said.

What they saw or later learned, as Trump told it, played out just as a Hollywood script-doctor might have written it.

U.S. aircraft flew low and fast for about an hour and 10 minutes over airspace controlled by Turkey and Russia. Officials assumed those flights would be uneventful, but there is always a concern when flying over an adversary armed with sophisticated air defenses.

As Trump explained it, eight helicopters were met with gunfire as they approached the compound, and returned fire to neutralize the threat.

The choppers landed, and "a large crew of brilliant fighters" emerged. They blew holes into the building to avoid a booby-trapped main door.

They then began capturing fighters, killing anyone who resisted. "A large number" of al-Baghdadi's men were killed, Trump said. Eleven children were moved to a safe location.

Chased by U.S. special operations dogs, al-Baghdadi fled into what the president called a dead-end tunnel with three children. The dogs' names and breeds are classified. The commandos had a robot on scene for such circumstances, but it wasn't deployed.

"He was screaming, crying and whimpering," Trump said. "He was scared out of his mind."

Al-Baghdadi then detonated a suicide vest, ending all four lives and collapsing the tunnel.

The commandos spent two hours total in the compound, collecting "highly sensitive" material, Trump said.

To be certain of al-Baghdadi's identity, the operators had a team onsite with samples of his DNA. How they got those samples was not disclosed.

They conducted a field test on the mutilated remains, to prove they had the right target.

"100 percent Jackpot, over," was the radio call from the special operations commander, once the DNA match was confirmed.

The founder of the world's most fearsome terror group was no more.

The implications for the fight against ISIS were uncertain, experts said, given the new instability in the region in the wake of Trump's decision to withdraw U.S. troops. But this was without a doubt a big counterterrorism win.

"He died like a dog," said Trump. "He died like a coward."