The Easter Sunday attacks in Sri Lanka stunned many, and not only because they marked the worst violence in the country in a decade. Or because the terrorists targeted Christians and foreign tourists, two groups that, for the most part, were spared during Sri Lanka’s three decades of civil war. Or because the attacks were coordinated, with explosives going off in three cities.

On Monday, Sri Lankan officials blamed National Thowheed Jamaath, a little-known local Islamist group, for the Sunday carnage. Authorities said the group probably had international assistance. Then, on Tuesday, the Islamic State — also known as ISIS — claimed credit. And this, too, was a surprise. Sri Lanka did not have a history of Islamist extremism; if anything, it is the nation’s Muslim minority that has faced harassment from the Buddhist majority in recent times.

“Sri Lanka’s Muslim community had no history of violence against other groups and was widely seen as moderate and restrained, even in the face of violent attacks by radical Buddhist groups,” Alan Keenan, senior analyst for Sri Lanka at the International Crisis Group, wrote in an email.

And Sri Lanka, relative to its neighbors, did not have a large number of foreign fighters leave the country to join the Islamic State.

“I’d say if you looked around the region” to assess where nations ranked on terrorism threats, Sri Lanka “would probably fall toward the bottom, largely under the radar,” Colin Clarke, senior research fellow at the Soufan Center, told The Washington Post. “It hadn’t really been on anyone’s radar.”

In part, that’s because of Sri Lanka’s particular history. The civil war waged between the state and the Liberation Tigers of Tamil Eelam, or Tamil Tigers, a separatist group that wanted a Tamil nation, was fought over ethnic, not religious, tensions.

“The legacy of civil war and insurgency [is] really important when you look at why security forces in Sri Lanka … may have overlooked the threat,” Clarke said. “When you fight a group like the Tamil Tigers for 30 years — the most sophisticated terrorist organization we’ve ever seen before, and I’d include the Islamic State in that — when you fight that kind of a group for 30 years, there’s a residual effect, there’s a lag effect. Ten years later, you’re still pretty much focused on that threat.”

Even in a region as volatile as South Asia, Sri Lanka’s connection to Islamist extremism has been relatively weak. According to a 2017 Soufan Center report, 75 fighters from India, over 650 from Pakistan and 32 from Sri Lanka joined the Islamic State in the years after the start of the Syrian conflict. “We don’t really know how many left and how many returned,” Clarke said, but the number is certainly not as staggering as that from, say, Pakistan.

It isn’t even as staggering as that from Maldives. There are roughly 22 million people in Sri Lanka and about 440,000 in Maldives — but, per a 2015 Soufan Center report, there were 200 Islamic State fighters from the Maldives.

“There were worries by diplomats and Muslim leaders I spoke to about Muslims from other countries — [especially] the Maldives — who were thought to have connections with ISIS and were living in Sri Lanka — but they were not thought to pose any threat to Sri Lankans,” Keenan wrote.

“This may change as more digging is done, but as someone who repeatedly asked Muslim leaders and government officials and diplomats the past 4 years about any ISIS threat and was told it was watched closely but there were no major risks seen, I think almost everyone is surprised to learn of the connections there appear to have been — though they also appear to be quite recent,” he added.

The degree to which the Islamic State was actually connected to Sunday’s devastation has yet to be determined. But some experts say it is not inconceivable that Sri Lanka should find itself under attack, given the extremist networks operating in South Asia.

“There’s been a pretty active group of jihadists in South Asia. … Almost every country in the region has been hit by Islamic attacks — India, Pakistan, Afghanistan, Bangladesh,” said Seth Jones, director of the Transnational Threats Project at the Center for Strategic and International Studies.

“The reality here is that South Asia remains a primary battlefield for jihadist networks. In that sense, Sri Lanka should not come as a surprise per se,” Jones said. “The networks are pretty fluid across the region,” he added, pointing to a recent CSIS report that illustrates how hard South Asia has been hit by Islamist terrorism.

“It makes sense from a regional point of view in some ways,” John Watts, a nonresident senior fellow at the Atlantic Council, told The Post. “There are little pockets of this sort of religious extremist violence across South and Southeast Asia.”

“It’s one of those things where it makes sense retrospectively.”