As Russia reels from a spate of deadly shootings by armed extremists for the second time in just over three months, questions have swirled over how the Kremlin's powerful security forces failed to prevent the attacks.
Some pro-Kremlin officials suggested Ukraine and the West were somehow linked to Sunday's violence in the southern Dagestan region, in which gunmen opened fire on churches and synagogues, killing 20 people.
But independent analysts have said the shootings are another example of how blindsided the authorities have become to homegrown Islamist violence as they focus their resources on threats from Ukraine.
"I think there is a danger in underestimating a version of the Islamist threat," said Grigory Shvedov, editor-in-chief of the caucasianknot.info website. Both he and his site are labelled by Russia as foreign agents.
"The dysfunction of the authorities, who are engaged in other tasks, is quite obvious," he said.
Instead of focusing on "homegrown terrorists inside Dagestan", security forces have been engaged with the "special military operation" and "with the West", he said.
"Of course, this is dangerous."
Sunday's attacks came just three months after Islamic State (IS) group fighters killed more than 140 people in the Crocus concert hall outside Moscow, the deadliest attack in Russia for almost 20 years.
Shvedov suggested that Sunday's attack also bore the hallmarks of IS.
"I believe that this attack is connected with Crocus. They may have a common ideological centre," he said.
Investigators opened a criminal probe into terrorism after the shootings in Dagestan, but have not said whom they think is responsible.
Russia has for years been targeted by IS and IS-linked groups, which oppose Moscow's military support for Syrian leader Bashar al-Assad and air strikes in Syria.
The North Caucasus was a hotbed of extremism during the 1990s and 2000s, in part a reaction to Russia's military campaigns to wrest control of the Chechen region from separatists.
The Kremlin on Monday told reporters it was not afraid of a similar period of violence returning.
Tensions in the Muslim-majority region have remained high since the war in Gaza began last October.
Pro-Kremlin lawmaker Leonid Slutsky, who chairs the Russian State Duma's foreign affairs committee, suggested the West was somehow involved in Sunday's attack.
"The United States and its European satellites, who cannot accept the actual defeat of their Kyiv puppets on the frontlines of the special military operation, have turned into outright sponsors of state terrorism," he wrote on social media, without providing evidence.
"The blood of the victims of (Sunday's) terrorist attacks is also on their hands," he said.
Dagestan regional governor Sergei Melikov said the attack showed the war in Ukraine was "coming to our home".
But analysts said intelligence failures likely played a part.
The Ukraine war has "minimised communication between Western and Russian intelligence services, which had previously exchanged information on radical Islamists for nearly three decades," Alexander Baunov, senior fellow at the Carnegie Politika publication, said on social media.
Security ties with the West have "been severed and trust has been lost", he wrote, pointing to the Kremlin's failure to act on public warnings from the West ahead of the Moscow concert hall attacks in March.
While the war in Ukraine has given the impression of a strengthened state, "in reality the opposite may be true", he wrote.
"In many places, the peacetime system of governance that had been developed over decades has been destroyed and radically skewed."