Syrian Kurds say they managed to place a spy in Abu Bakr al-Baghdadi's inner circle who stole a pair of the Islamic State leader's underpants to prove his identity and then helped guide US soldiers to his Syrian hideout.
The Syrian Democratic Forces (SDF) claim they played a key role in tracking down Baghdadi to a compound in northern Syria where he was reportedly planning his escape over the nearby border into Turkey.
Donald Trump has thus played down the role of the SDF, who fought the military campaign against Isis with US troops, but whom Trump abandoned earlier this month by ordering US troops to stand aside before a Turkish offensive against the Syrian Kurds.
"Since 15 May, we have been working together with the CIA to track Al Baghdadi and monitor him closely," Polat Can, a senior SDF official said on Twitter. "One of our sources was able to reach the house where Al Baghdadi was hiding. Al Baghdadi changed his places of residence very often. He was about to move to a new place in Jerablus [on the border with Turkey]."
He continued: "Our own source, who had been able to reach Al Baghdadi, brought Al Baghdadi's underwear to conduct a DNA test and make sure (100%) that the person in question was Al Baghdadi himself."
Related: Visual guide to the raid that killed Isis leader Abu Bakr al-Baghdadi
Trump has claimed credit for masterminding the operation that led to Baghdadi's death, but according to the SDF version, his withdrawal of US forces led to a postponement of the operation.
"More than a month ago, the decision was made to eliminate Al Baghdadi. However, the US withdrawal and the Turkish invasion prompted us to stop our special operations, including the pursuit of Al Baghdadi. The Turkish invasion caused a delay in the operation," Can said.
"Our intelligence source was involved in sending coordinates, directing the airdrop, participating in and making the operation a success until the last minute."
The SDF commander, General Mazloum Kobani, also referred to a SDF-run spy in Baghdadi's entourage in interviews with US media on Monday.
Asked about the SDF role in the operation in Idlib province late on Saturday night, the chairman of the US joint chiefs of staff, General Mark Milley, gave a carefully-worded reply, saying he was "not going to comment on what may or may not have happened with the SDF" but stressing that the air operation and the soldiers sent into the compound were exclusively US special forces.
Mazloum told NBC that the SDF agent was at the Baghdadi compound when the assault took place, that he had served as a security adviser to the Isis leader and that his betrayal was motivated by revenge.
The husband of Baghdadi's sister-in-law has emerged as another key figures earlier on in the hunt for the Isis leader. According to Iraqi intelligence officials, Muhammad Ali Sajid al-Zobaie led them to a desert tunnel on the Iraqi Syrian border, where items linked to the Isis leader were found. The Iraqis say they found a weapon, medical bags, religious books and a small handbag containing maps and hand-drawn locations inside the cache.
Related: 'He died as he lived - a coward': Isis victims' relatives on Baghdadi's death
From that starting point, the smuggler who proved central to the hunt was located, as was one of Baghdadi's wives and a nephew. All three were co-opted, and they led Iraqis and Syrian Kurds who had then been enlisted by the CIA to northern Idlib province, near an area called Jebel al-Druze in the beginning of September.
Baghdadi is thought to have not long been in the province and was regularly moving between a series of simple houses.
In a Pentagon briefing Milley gave few new details about the Saturday raid on a compound near the Syrian-Turkish border which led to Baghdadi's death when he detonated a suicide vest in a tunnel.
"Baghdadi's remains were then transported to a secure facility to confirm his identity with forensic DNA testing, and the disposal of his remains has been done, and is complete, and was handled appropriately," Milley said. Another Pentagon official confirmed that Baghdadi's body was buried at sea at an unnamed location, similar to the 2011 sea burial of al-Qaida leader Osama bin Laden after he was killed in a US special forces raid in Pakistan.
He said that two men had been captured alive at the compound and were in US custody in an unspecified location.
Milley said he could not confirm Trump's claim that Baghdadi had been "whimpering and crying" as he fled US forces in a tunnel at the compound.
"The president had planned a talk down to the unit and unit members," the general said. "I don't know what the source of that was, but I assume it was talking directly to unit."