Three policemen and a civilian were shot dead in Kazakhstan's financial capital, Almaty, as authorities said they had launched an "anti-terrorist operation".
The Interfax news agency, quoting a police source, said that "a religious radical and probably a follower of non-traditional Islam" was on the rampage in central Almaty, opening fire from time to time.
At least one attacker had been detained by the police, the RIA news agency quoted a security source as saying. It said several policemen had also been wounded.
Two witnesses told the Reuters news agency they had heard shots in several different areas in the centre of Almaty, the country's biggest city, on Monday.
OPINION: Kazakhstan FM - Overcoming 'extremism' is a priority
"We saw a man with a rifle, he passed by," one shop worker said.
Police cordoned off several central streets, including the one near a local office of the KNB security police, where shots were also heard.
"I heard one shot, most probably fired from a pistol," said one man standing nearby.
Kazakhstan, an oil-rich nation of 18 million, is far more prosperous than its post-Soviet neighbours in Central Asia.
But the country has recently seen outbreaks of violence, initially triggered by discontent over proposed land reforms.
The national intelligence agency, the KNB, said last month it had detained several members of a group which planned "terrorist acts using improvised explosive devices", following a deadly attack in the northwestern town of Aktobe.
In that incident, about two dozen men described by the authorities as sympathisers of the Islamic State of Iraq and the Levant group, also known as ISIS, attacked gun shops and a national guard facility, killing seven people.
Security forces killed 18 attackers, some on the same day and some during a subsequent manhunt.