SAN'A, Yemen—The source of a tip that alerted security agencies around the world to the package-bomb plot late last week was Jabir al-Fayfi, a Saudi national and former Guantánamo Bay inmate, a Yemeni security official said Monday.

The tip-off has been heralded as a major intelligence coup. But the detainee's shifting loyalties to al Qaeda over the years also underscore the challenges in battling the group.

Mr....