The Easter attacks in Sri Lanka that killed more than 350 people in churches and hotels showed how the warnings went largely unheeded. It also exposed how a legacy of civil war, marginalization, political disarray and security lapses cultivated fertile ground for the militants to carry out their attacks.
The Islamic State group, which has lost all the territory it once held in Iraq and Syria, claims it was behind the bombings. Sri Lankan authorities remain unsure of its involvement, and have blamed breakaway members of two obscure local Muslim extremist groups.
Bruce Hoffman, a senior fellow for counterterrorism at the Council on Foreign Relations, said as far back as 22 years ago on his first visit to Sri Lanka there were Muslims who were concerned about people being radicalized.
He said Sunday's attacks would have likely required an elaborate process of recruitment, radicalization and then sequestration to prepare suicide bombers for their mission. The plan would have also needed safe houses for bomb makers, operatives who could conduct surveillance and reconnaissance of targets, and others to transport the bombers safely.
"You are talking about a resource and manpower-intensive activity ... that has historically been beyond the capabilities of a small local would-be terrorist organization," Hoffman said.
One of the suicide bombers is suspected of being the former leader of a little-known group named National Towheed Jamaat.
In 2014, a group called the "Peace Loving Moderate Muslims in Sri Lanka" published a statement in the local Daily Mirror newspaper denouncing National Towheed Jamaat and warning that it was "fast becoming a cancer" within Sri Lanka's Muslim community.
The statement warned that members of the group were making mosque attendance compulsory, forcing a strict implementation of Islamic law above Sri Lankan law and forcing women to cover their faces and wear long robes in place of traditional saris.
"It is tragic that the majority of Muslims who are essentially peace loving are to pay for the actions of this minority," the statement said.
"We fear that these activities ... if left unchecked by the authorities, would create a situation in which the majority of Muslims in Sri Lanka, already under threat and harassment from this extremist minority, may have to face the wrath of other religions," the statement said.
There were other signs as well of encroaching fundamentalism.
Andreas Johansson, who wrote a book about Muslim politics in Sri Lanka, said he found speeches by Osama bin Laden translated into Tamil in a mosque in Colombo and similar types of material in the east coast of the country on visits between 2006 and 2013.
Still, attacks in 2006 by Muslim fundamentalists on Sufi shrines in the city of Kattakundy may have been the clearest indication at the time of how a narrow, literalist interpretation of Islam that views shrines as idolatrous had spread to Sri Lanka.
A 2007 academic policy paper warned that violence by fundamentalist Muslims against Sufis in Sri Lanka might one day give rise to armed Islamist movements.
The paper by Dennis McGilvray and Mirak Raheem for the East-West Center in Washington noted the Sufi mosque attacks exemplified how various forms of Wahhabi influence had entered the country from Saudi Arabia through concealed channels of money and proselytization.
One reason why the warning signs may have been ignored is that the government's overwhelming focus was on suppressing any revival of Tamil separatism.
Like other minorities, Muslims remained marginalized after the civil war between the Sinhalese Buddhist government and the mostly Hindu Tamil militants ended in 2009.
Muslims in Sri Lanka, who are spread out geographically, never quite belonged to either side of the 26-year war.
During the war, they joined various militant groups fighting in the conflict. Hundreds of Muslim youth were also abducted and killed by Tamil militants because of their Muslim identity.
There were largescale massacres in mosques in Kattakundy and Eravur, where more than 260 Muslim were killed in 1990. Muslims were also forced to flee northern towns, leaving thousands still displaced.
McGilvray and Raheem point out that given the scale of violence and frustration within the Muslim community, the environment appeared ripe for fostering radicalism and militancy.
Even so, Hoffman said it would be a "quantum leap" for a local group like National Towheed Jamaat to go from being linked to vandalism of Buddhist statues to planning and executing the Easter Sunday attacks.
If the attacks were carried out by a purely local Sri Lankan group, the attackers would have sought revenge against the Buddhist community for ultranationalist mob attacks on Muslims over the years and not churches or hotels, said Neil Devotta, a professor at Wake Forest University in North Carolina who has written extensively about Muslims in Sri Lanka.
Radical groups like National Towheed Jamaat do not represent even 1% of the Muslim population in Sri Lanka, he said.
"What the moderate Muslims in Sri Lanka really fear is that these sorts of groups provide ammunition to Sinhalese Buddhist nationalists who tend to view Muslims and other minorities, but especially Muslims, in a very negative light to begin with," Devotta said. "This is not good for the Muslim community."
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.