WASHINGTON -- Five senior leaders of the Islamic State of Iraq and Syria (ISIS) were captured in a joint operation involving U.S. and Iraqi forces. It is the latest defeat for the extremist group, which has lost nearly all the territory it once held in Iraq and Syria.

The ISIS commanders' confessions were broadcast on Iraqi television this morning.

One by one, men in yellow jumpsuits and handcuffs admitted to being top ISIS leaders.

Their capture was the result of an elaborate intelligence operation run by Iraq and the U.S.

President Trump tweeted the announcement earlier Thursday.

Five Most Wanted leaders of ISIS just captured! — Donald J. Trump (@realDonaldTrump) May 10, 2018

First came the capture of Ismail al-Eithawi, described as a close aide to ISIS leader Abu Bakr al-Baghdadi.

U.S. and Iraqi forces then used an app on Eithawi's mobile phone to lure the other men across the Syrian border and into Iraq where they were arrested.

The Iraqi government said information gather during interrogations led to an air strike it claims killed another 40 ISIS terrorists.

"These guys ... have an understanding of what's happened to ISIS post-caliphate, where the senior leaders are in general ... what their plans might be for going forward," former acting director of the CIA and CBS News senior national security contributor Michael Morrell said.

U.S. officials say ISIS leadership has been decimated through airstrikes and ground operations. But al-Baghdadi is believed to still be operating on the border between Syria and Iraq.

A still photo from video posted on a militant website July 5, 2014, purports to show the leader of the Islamic State of Iraq and Syria, Abu Bakr al-Baghdadi, delivering a sermon at a mosque in Iraq during his first public appearance. Militant video/AP

"He is the main individual we are after, for two reasons," Morrell explained. "One is his removal would be a symbol of the defeat of ISIS in Iraq and Syria and he is a galvanizing force holding the rest of the group together. So if he went away, it would splinter apart."

U.S. officials view al-Baghdadi as a threat because in the last few years he has inspired attacks in the U.S., such as the 2015 San Bernardino attack which killed 14. The shooters in that incident pledged their allegiance to the ISIS leader.