U.S. commandos zeroed in on Abu Bakr al-Baghdadi’s final hideout with the help of an extraordinarily well-placed informant, an Islamic State operative who facilitated the terrorist leader’s movements around Syria and even helped oversee construction work on his Syrian safe house, according to U.S. and Middle East-based officials knowledgeable about the operation.

The mole’s detailed knowledge of Baghdadi’s whereabouts as well as the room-by-room layout of his sanctuary proved to be critical in the Oct. 26 raid that ended with the death of the world’s most-wanted terrorist, the officials said.

The informant was present during the assault on Baghdadi’s compound in the Syrian province of Idlib, and he was exfiltrated from the region two days later with his family. The man, whose nationality had not been revealed, is expected to receive some or all of the $25 million U.S. bounty that had been placed on Baghdadi’s head, according to the officials. One official said he was a Sunni Arab who turned against the Islamic State because one of his relatives had been killed by the group.