Almaty (Kazakhstan) (AFP) - Two multiple-target attacks in as many months have shaken Kazakhstan's reputation for stability and led to fears that home-grown radicalism could be on the rise in the ex-Soviet republic.
Some have suggested that the central Asian state's faltering economy may also have had a role in the unrest.
On any given evening the trendy cafes lining the leafy boulevards of economic hub Almaty teem with chatting students, creative types and business people enjoying the fruits of years of oil-fuelled economic boom.
But on Monday the scene was shattered when gunmen attacked a police station and a building used by the security services, leaving six dead.
President Nursultan Nazarbayev called it an "act of terror."
On June 5, four civilians and three soldiers were killed in the western city of Aktobe when assailants attacked gun shops and tried to storm a military base in a bus they had hijacked.
Security forces killed 18 people suspected of involvement in the Aktobe incidents.
Nazarbayev said the attacks had been orchestrated "from abroad" and carried out by "followers of the non-traditional religious movement Salafism," referring to an ultra-conservative brand of Sunni Islam.
Sabina Sailaubekova, a marketing specialist who witnessed Monday's attack in Almaty, told AFP: "I never thought something like that would happen so close to us."
"We had no idea how to react in such situations."
Under Nazarbayev, 76, majority-Muslim Kazakhstan, which shares a border with Afghanistan, has cultivated an image as an island of stability in a volatile region wracked by poverty.
While other former Soviet republics in the region have endured varying degrees of political upheaval, ethnic clashes and violence, Nazarbayev's firm rule since the fall of the USSR has largely kept a lid on any turmoil in his own country.
So far the motives for Monday's attack remain murky.
- Jihadist links? -
Police on Thursday said the main suspect had previously carried out several armed robberies and had spent two stints in jail.
They also said he was usually unemployed and that he had been violent towards his wife, whom he forced to wear Islamic clothing.
An estimated 300 Kazakh citizens are thought to have joined jihadist groups in Syria and Iraq, including the Islamic State group, fuelling speculation about a religious motive.
Some IS propaganda videos feature Kazakh children.
While police have not yet explicitly linked the main suspect in Monday's attack to any jihadist groups, the country's security chief has suggested he might have formed ties with followers of an ultra-conservative strain of Islam during stints in jail.
Commentators have been cautious in connecting the two recent attacks directly.
Erlan Karin, director of the government-linked Kazakhstan Institute for Strategic Studies, told AFP that similarities between the two attacks suggested Monday's assault might have been inspired by the bloodshed in Aktobe.
"As regards the Islamic State and other groups, it is possible attackers are influenced by these movements, while not having any kind of formal affiliation," said Karin.
He argued the attacks followed a broader pattern seen across the globe of "lone wolf or lone cell attacks."
For others the flickers of violence in Kazakhstan are linked to wider instability driven by the shock of falling oil prices and Russia's economic downtown.
In April and May, rare protests took place in several parts of the country against proposed land reforms, prompting the president to postpone the changes.
Analyst Raffaello Pantucci said the attacks that followed have "to some extent shattered the all-powerful image projected of the country's security services" and left Kazakhstan looking unusually vulnerable.
"On the back of the economic slump it is quite a worrying time for the country, with a lot of unrest," Pantucci, the director of international security studies at the Royal United Services Institute in London, told AFP.
"Random attacks might just be the sharp end of that."