After years of intelligence gathering, U.S. Special Operation Forces had no doubts the mutilated body of a man killed during Saturday night’s daring raid in Syria was the long-sought ISIS leader, employing new technology and DNA testing to positively identify Abu Bakr al-Baghdadi's headless remains almost immediately.

While the commandos had visually identified al-Baghdadi before he fled down a dead-end tunnel with three children -- where he was found "whimpering" and trapped before detonating a suicide vest -- that wasn’t enough. Various accounts have told of his death in the past, only for him to surface yet again.

WHO'S LEADING ISIS NOW THAT AL-BAGHDADI IS DEAD?

“There wasn’t much left,” President Trump said of al-Baghdadi’s remains during a Sunday morning news conference following the raid, “but there are still substantial pieces that they brought back.”

Al-Baghdadi’s head remained intact following the blast, allowing commandos to use biometrics, specifically facial recognition, to immediately identify him, Fox News National Correspondent Jennifer Griffin reported.

Biometrics is a method of authenticating a person’s ID that uses human features such as fingerprints, facial recognition or other physical characteristics.

U.S. forces can use an image taken of a terrorist or suspect to search databases of photos the military has built up over time to match the individual’s identity, according to the Army Times.

AL-BAGHDADI KILL: HOW THE DARING MILITARY OPERATION WENT DOWN

But the soldiers didn’t just rely on biometric analysis.

Trump said they had brought along samples of al-Baghdadi’s DNA. It was unclear how they obtained the ISIS leader's DNA, but a U.S. official told The Washington Post on condition of anonymity that it was voluntarily provided by one of his own daughters.

“They did an onsite test because we had to know this,” Trump said. “And it was a very quick call that took place about 15 minutes after he was killed, and it was positive.”

"It was him," Trump declared.

TRUMP DEFENDS KEEPING 'LEAKER' SCHIFF, PELOSI OUT OF THE LOOP ON AL-BAGHDADI RAID

After Navy Seals killed Al Qaeda leader Usama bin Laden in Pakistan in 2011, it took eight hours to make a positive identification through DNA analysis, The Washington Post reported in 2013, citing a top-secret U.S. intelligence document. Samples of the terrorist's remains had to be physically taken to a U.S. military DNA lab in Afghanistan to provide a conclusive match.

Since then, advances in technology have allowed for so-called on-the-spot DNA testing, which dramatically cuts down the processing time for results.

In 2015, SOCOM revealed the use of new types of portable DNA labs that could produce results in just 90 minutes rather than weeks of waiting, Defense News reported at the time. The devices at the time weighed about 120 to 200 pounds and cost about $250,000 each.

"It's a groundbreaking, game-breaking technology," Michael Fitz, SOCOM's program manager for sensitive site exploitation, told the outlet at the time.

CLICK HERE FOR THE FOX NEWS APP

He hoped that advances in technology could soon produce smaller, lightweight devices.

It’s unclear what type of devices were used during the al-Baghdadi raid to positively identify the ISIS leader.

The Associated Press contributed to this report.