Prime Minister Narendra Modi's intervention, including discussions with the Emir of Qatar, played a pivotal role in advocating for the men's release.