A week ago, Sri Lankan tourist guide Ricky Costa was preparing for a typically easy Sunday ferrying backpackers between Colombo's tea shops and beach bars in his canary-yellow rickshaw. Then the blasts began.
The coordinated suicide bombings by terrorists at hotels and churches killed more than 250 people and sent shockwaves through an Indian Ocean island state that had enjoyed relative peace since a civil war ended a decade ago.
How such a sophisticated operation could have been carried out in a country where violence by terrorists drawn from the Muslim minority was not high on the list of concerns has left Sri Lankans and foreign intelligence agencies stumped.
President Maithripala Sirisena has announced a total overhaul of the security establishment, blaming them for failing to communicate several warnings they had about potential attacks, including one from India hours before the first bomb.
However, interviews with more than a dozen people with direct knowledge of the Sri Lankan government and security apparatus, including military sources, senior diplomats and intelligence agents, suggest deeper failings that created an ideal environment for terrorists looking for a soft target.
Since Buddhist-majority Sri Lanka won a 26-year conflict against mostly Hindu ethnic Tamil separatists, a well-resourced military has failed to adapt to shifting security threats, the sources said.
"The government was asleep. The military was asleep. They've been asleep for a long time," said Costa, perching on his rickshaw as a suspicious policeman peered inside.
Costa's analysis is a simplification, but some experts agree that a lack of preparedness was a significant factor that led to a little-known terror group being able to orchestrate the deadliest attack of its kind in South Asia's history.
Sirisena and Prime Minister Ranil Wickremesinghe have both apologised for any lapses that might have contributed to the attacks. Wickremesinghe said the government and security forces take "collective responsibility".
There are no official figures on the size of Sri Lanka's armed forces but experts estimate there are around 150,000 active military personnel and 80,000 police officers, both substantial forces for a country of just 22 million.
Despite its size, the military had become "flabby" and "unfocused", according to one Western diplomat. Military personnel with little to do have been conscripted into commercial ventures, including whale-watching tours for tourists, running hair salons and tending to farms.
Military spokesman Sumith Atapattu said it was wrong to suggest that the armed forces had not given sufficient priority to evidence of emerging terrorism , but added they could only take action when there was evidence of criminal activity.
"We have passed the necessary information to the relevant authorities. But what is the legal background the military has to control extremism? A person being radicalised is not an offence in our country," he said.
"We are searching for reconciliation after a long period of war and we cannot use a sledgehammer to kill a fly."
Another foreign diplomat said he spoke to a senior military intelligence official the day before the attacks to warn him of an imminent threat. When he asked the official if he would raise the warning to the top echelons of government, he was told "not during the holidays".
"Ten years of peace breeds over-confidence," the diplomat said. "It's easy to focus on the last weeks and months, but this attack was made possible by a much longer-term decline in the functionality of Sri Lanka's security services and government."
The military has also been more focused on monitoring the country's Tamil population and preventing another separatist insurgency than on a Muslim community that makes up only 10 percent of the population, defence sources and experts said.
"This inattention could have created the opportunity for a local group - perhaps with external encouragement or support - to emerge from obscurity and perpetrate such terrifically lethal attacks," said Bruce Hoffman, a terrorism expert at the Council on Foreign Relations.
Security experts believe National Thowheeth Jama'ath (NJT), a local terror group that has emerged over the last year, was responsible for the attacks, likely with the assistance of outside groups. ISI has claimed responsibility for the bombings, without providing evidence.
Though Sri Lanka has no significant history of violence between its Muslim and Christian minorities, some say the warning signs of a changing social dynamic were there.
Concerns raised about a more radical strain of Islam emerging over the last five years went unheeded, civil society groups and Western diplomats say.
Hashim Mohamed Zahran, the alleged ringleader of the Easter Sunday blasts, had been flagged to security officials as a threat.
"We had concerns and we raised them. They were not properly considered," said Hilmy Ahamed, vice president of the Muslim Council of Sri Lanka, a civil society group.
Zahran, a man in his early 30s who had been preaching an increasingly militant brand of Islam, was one of two attackers who died after detonating their explosives in the luxury Shangri-La hotel, intelligence officials say.
Ahamed said that in February he warned a contact in the intelligence services of the threat posed by Zahran. He received a text message response. "Thank you. Noted," it said.
"There was an overall environment of complacency. That is the tragedy," Ahamed said.
The top civil servant in Sri Lanka's defence ministry, Defence Secretary Hemasiri Fernando, resigned on Thursday, taking responsibility for the attacks after Sirisena pinned the blame on the security services.
Many Sri Lankans believe a deep rift between Sirisena and Prime Minister Wickremesinghe has also undermined national security.
Sirisena fired Wickremesinghe last year, after months of tension, only to be forced to reinstate him under pressure from the Supreme Court.
Since then their relationship has deteriorated further to the point where their factions actively try to undermine each other, including not sharing security information, defence sources say.
"Inefficiency, mediocrity, and infighting within the government contributed to last week's attack," said Iqbal Athas, a defence analyst, adding that vital intelligence-gathering resources had been diverted in recent years to spy on political rivals rather than to monitor extremists.
Presidential aide Shiral Lakthilaka said Sirisena and Wickremesinghe's feuding had come to an end.
"The past is past," Lakthilaka said in response to a question about the impact the rift had on security. "Whatever the setbacks, both have shed their differences and are working towards eradicating this menace and bring all the underground activities to a standstill."
An ally of the prime minister, government spokesman and health minister Rathija Senaratne, blamed the president for the rift. "He by-passed ministers as well," he said.
If there was an element of lethargy in the Sri Lankan state, it has been jolted back to life. One diplomat said the defence forces had "reverted to war mode".
The streets of Colombo are marshalled by hundreds of soldiers and police, as everyone fears the possibility of more attacks or a spike in retaliatory sectarian violence. Nearly 10,000 soldiers have been deployed countrywide.
A gun battle on Friday between troops and suspected terroristson the east coast killed 15, including Zahran's father and two brothers, in a sign that Sri Lanka's security crisis is far from over.
Named Lonely Planet's No. 1 travel destination for 2019, Sri Lanka had built a reputation over the past decade as a stable, relaxed island in a chaotic region.
That image has been shattered by Sunday's bombs.
"For 10 years this was a laid-back place," said Costa, as a truck of armed soldiers sped past. "Not anymore."