The Sri Lankan authorities were told more than four months ago by foreign security agencies that a network of violent Islamist extremists is active in the country and is likely to carry out terrorist attacks, regional and western authorities said.
The revelation that officials had demanded last year about more than 350 people killed by those responsible for the bombings on Easter Sunday will stir up indignation at what now appears to be a multiple and systematic failure of the intelligentsia.
On Wednesday, President Maithripala Sirisena called for the resignation of high-ranking officials who had not submitted three separate formal warnings to Indian authorities in the three weeks prior to the attack.
The sources said that these formal warnings followed months of informal talks between Indian investigators and their Sri Lankan counterparts, which shared details of the network, including the identities of its leader and its members.
Sirisena has already called for a comprehensive security clearance after failing to prevent one of the deadliest terrorist attacks in recent years.
Sarath Fonseka, a field marshal and politician from Sri Lanka, told Parliament that the attack appeared to have been "seven or eight months in the pipeline", revealing a "monumental failure in gathering information".
"In another country, the entire government would have had to resign to mess things up, but it will not happen here," he said. "Safety has become a joke."
The Indian information was compiled from a vast amount of data that was confiscated during the raids on alleged sympathizers of the Islamic State in November and their subsequent interrogation.
A large number of phones, data carriers and USB keys collected in the raids revealed links between inmates and Mohammed Zahran Hashim, the alleged leader of the Sri Lanka terrorist network responsible for the bombings, told security officials to the Guardian.
A surveillance operation revealed that the radical cleric, already known to the Sri Lankan security services, had repeatedly contacted known Isis activists in Bangladesh. Hashim also reportedly had contact with Isis-affiliated militias in eastern Afghanistan.
Isis has taken responsibility for the bombings, which are believed to be the deadliest ever performed by the group.
Indian officials raised their informal warnings to the Sri Lankans after explosives were found on a remote farm in a national park in northwestern Sri Lanka. Hashimi's network was connected to the cache. They did not know at this time that churches or hotels should be targeted.
It is not clear why Delhi waited until April to issue a formal communication on the threat.
On Wednesday, the number of deaths from the attacks on three churches and three luxury hotels in and around the capital, Colombo, increased to 359, with 500 injured.
Despite the extent of the ongoing security operation, Sri Lankan Prime Minister Ranil Wickremesinghe said several suspects armed with explosives had not yet been found.
He said that there were more explosives and militants "out there" and confirmed reports that an attack on a fourth large hotel had failed and that the Indian embassy was also a possible destination.
One of the suspects was identified as Abdul Lathief Jameel Mohamed on Wednesday after Sri Lanka's Defense Minister said a suspect had studied in the UK and Australia. British counter-terrorism investigators believed that they believed Mohamed had been visiting a university in south-east England from 2006 to 2007, and that they had searched for relatives or signs of extremist activity during his time in the UK.
Eighteen suspects were arrested overnight so that the total number of arrested persons was more than 60.
Up to nine people who are directly linked to the attack could still be at large, the investigators said. Officials said authorities would expect more arrests in the coming days.
The exact role of Isis in the attacks is not yet clear. It is possible that the group's involvement turned Hashim's network away from bombs aimed at destroying important Buddhist monuments and goals more closely linked to its global jihadist ideology.
Hashimi appeared in a video released by Isis on Tuesday after assuming responsibility. The cleric, dressed in a black tunic and a headscarf, carries a rifle and leads a group of men who are said to be the attackers of Sunday.
Officials from Western and Southern Asia said Hashmi set up a group of extremists in a small village in eastern Sri Lanka, attracting dissatisfied young men. The middle-aged cleric traveled overseas about two years ago, possibly to the Maldives, who have become a center of Islamist activism in recent years. Security agencies were watching Hashim's extremist online activism closely and were worried that he might build ties with Al Qaeda or Isis.
The Islamic State's Amaq News Agency also issued a statement declaring the "fighters" responsible and listed the names of the suicide bombers.
The funerals of those killed in the bombing continued in Negombo and Colombo on Wednesday, as a ban on social media and a state of emergency throughout the country continued.