Kazakhstan's National Security Committee (KNB) declared its "anti-terror" operation over in the financial capital after detaining the two suspects.
Three police officers and two civilians were shot dead in what President Nursultan Nazarbayev called "a terrorist act".
KNB security chief Vladimir Zhumakanov said one of the suspects may have "connected" with followers of the ultra-conservative Salafi strain of Islam while in jail on theft and weapons charges.
"We are checking this information," Zhumakanov said at a televised meeting of Nazarbayev's security council, without providing further details.
The first suspect is accused of killing a local resident during a carjacking and attacking the police station in broad daylight, then shooting dead a police officer and seizing his gun, the interior ministry said.
A civilian also died during the shooting at the police station.
The suspect then shot dead two officers as they gave chase, before he was arrested.
"According to preliminary information, the detained man is a 27-year-old man with previous convictions," the ministry said, adding that he was also suspected of murdering a woman at the weekend.
The health ministry said eight people had been admitted to hospital.
Two videos were widely shared on social networks showing a black-clad man roaming the streets of Almaty armed with a machinegun.
"I clearly heard shooting. Several shots were fired in quick succession. I was driving close to the police station at the time," a 40-year-old man who only gave his first name, Kanysh, told AFP.
Kazakh media reported a shootout at the national security committee building, but said the attack was repulsed and the building cordoned off.
Kazakhstan had already been on a "yellow level" threat alert after deadly shootings shook a town in its northwest in June.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
