Photo/IllutrationSri Lankan Navy soldiers stand guard in front of the St. Anthony's Shrine a day after the series of blasts, in Colombo, Sri Lanka on April 22, 2019. (AP Photo)

COLOMBO-- Sri Lanka's president gave the military sweeping police powers starting Tuesday in the wake of the Easter bombings that killed nearly 300 people, while officials disclosed that intelligence agencies had warned weeks ago of the possibility of an attack by the radical Muslim group blamed for the bloodshed.

The suicide bombings struck three churches and three luxury hotels Sunday in the island nation's deadliest violence since a devastating civil war ended in 2009. The government shut down some social media, armed security forces patrolled the largely deserted, central streets in the capital of Colombo, and a curfew went into effect.

The military was given a wider berth to detain and arrest suspects — powers that were used during the civil war but withdrawn when it ended.

Prime Minister Ranil Wickremesinghe said he feared the massacre could unleash instability and he vowed to "vest all necessary powers with the defense forces" to act against those responsible.

Adding to the tension, three unexploded bombs blew up Monday inside a van parked near one of the stricken churches as police were trying to defuse them, sending pedestrians fleeing in panic. No injuries were reported. Dozens of detonators were discovered near Colombo's main bus depot, but officials declined to say whether they were linked to the attacks.

The government blocked access to Facebook, WhatsApp and Instagram after the blasts, creating confusion and doing little to reassure residents and visitors that the danger had passed.

A nationwide state of emergency was scheduled to begin at midnight Monday (0630 GMT; 2:30 p.m. EDT) the president's office said, following the attacks that killed at least 290 people, with more than 500 wounded, according to police spokesman Ruwan Gunasekara. The three stricken hotels and one of the churches, St. Anthony's Shrine, are frequented by tourists, and dozens of foreigners were among the dead.

Tourism Minister John Amaratunga said 39 foreigners were killed, although the foreign ministry put out a different figure, saying the number of dead was 31.

The U.S. State Department confirmed that at least four Americans were among the dead and several others were seriously wounded, but it did not release any identities. The Sri Lankan government said other foreigners killed were from the U.K., Bangladesh, China, India, France, Japan, the Netherlands, Portugal, Saudi Arabia, Spain, Turkey and Australia.

A national day of mourning was declared for Tuesday.

International intelligence agencies had warned that the little-known group, National Thowfeek Jamaath, was planning attacks, but word apparently didn't reach the prime minister's office until after the massacre, exposing the continuing political turmoil in the highest levels of the Sri Lankan government.

Health Minister Rajitha Senaratne said the intelligence agencies began issuing the warnings on April 4; the defense ministry wrote to the police chief with information that included the group's name; and police wrote April 11 to the heads of security of the judiciary and diplomatic security division.

President Maithripala Sirisena, who was out of the country Sunday, had ousted Prime Minister Ranil Wickremesinghe in October and dissolved the Cabinet. The Supreme Court later reversed his actions, but the prime minister has not been allowed into meetings of the Security Council since October, which meant he and his government were in the dark about the intelligence.

It was not immediately clear what action, if any, was taken after the threats. Authorities said they knew where the group trained and had safe houses, but did not identify any of the suicide bombers, whose bodies were recovered, or the two dozen other suspects taken into custody.

All the bombers were Sri Lankans, but authorities said they strongly suspected foreign links, Senaratne said.

Also unclear was a motive. The history of Buddhist-majority Sri Lanka, a country of 21 million including large Hindu, Muslim and Christian minorities, is rife with ethnic and sectarian conflict.

In the civil war, the Tamil Tigers, a powerful rebel army known for using suicide bombers, was crushed by the government and had little history of targeting Christians. While anti-Muslim bigotry fed by Buddhist nationalists has swept the country recently, there is no history of Islamic militancy. Its small Christian community has seen only scattered incidents of harassment.

Two other government ministers also alluded to advance knowledge. Telecommunications Minister Harin Fernando tweeted: "Some intelligence officers were aware of this incidence. Therefore there was a delay in action. Serious action needs to be taken as to why this warning was ignored." He said his father had heard of a possible attack as well and had warned him not to enter popular churches.

Mano Ganeshan, the minister for national integration, said his security officers had been warned by their division about the possibility that two suicide bombers would target politicians.

Cardinal Malcolm Ranjith, the archbishop of Colombo, said the attacks could have been thwarted.

"We placed our hands on our heads when we came to know that these deaths could have been avoided. Why this was not prevented?" he said.

The coordinated blasts took place in the morning at St. Anthony's and the Cinnamon Grand, Shangri-La and Kingsbury hotels in Colombo, as well as the two churches outside Colombo. They collapsed ceilings and blew out windows, killing worshippers and hotel guests, and leaving behind scenes of smoke, soot, blood, broken glass, screams and wailing alarms.

A few hours later, two more blasts occurred just outside Colombo, one at a guesthouse where two people were killed, the other near an overpass, said Brig. Sumith Atapattu, a military spokesman.

Also, three police officers were killed while searching a suspected safe house on the outskirts of Colombo when its occupants apparently detonated explosives to prevent arrest, authorities said.

A pipe bomb with 50 kilograms (110 pounds) of explosives was found and defused late Sunday on a road to the international airport, said air force Group Capt. Gihan Seneviratne. It was powerful enough to have caused damage in a 400-meter (400-yard) radius, he said.

A morgue worker in Negombo, outside Colombo, where St. Sebastian's Church was targeted, said many bodies were hard to identify because of the blasts. He spoke on condition of anonymity because he was not authorized to talk to the media.

Nilantha Lakmal, a 41-year-old businessman who took his family to St. Sebastian's for Mass, said they all escaped unharmed, but he remained haunted by images of bodies being taken from the sanctuary.

At the Shangri-La Hotel, one witness said "people were being dragged out" after the blast.

"There was blood everywhere," said Bhanuka Harischandra, 24, of Colombo, a founder of a tech marketing company who was going to the hotel for a meeting. "People didn't know what was going on. It was panic mode."

The scale of the violence recalled the worst days of the civil war, when the Tamil Tigers, from the ethnic Tamil minority, sought independence from the Sinhalese-dominated country. The Sinhalese are largely Buddhist. The Tamils are Hindu, Muslim and Christian. Sri Lanka, off the southern tip of India, is about 70% Buddhist. In recent years, tensions have soared between hard-line Buddhist monks and Muslims.

Two Muslim groups in Sri Lanka condemned the church attacks, and Pope Francis expressed condolences at the end of his traditional Easter blessing in Rome.

U.S. Secretary of State Mike Pompeo said in Washington that he spoke to the prime minister and offered assistance.

"This is America's fight, too," he said. "We also stand with millions of Sri Lankans who support the freedom of their fellow citizens to worship as they please. We take confidence in knowing that not even atrocities like this one will deter them from respecting religious freedom."