At least five people were killed and nine injured in a suspected Islamist attack on a police station in Almaty, Kazakhstan’s largest city. President Nursultan Nazarbaev has announced that it was a terror act.

The figure was announced by Kazakhstan's Defense Minister Kalmukhanbet Kasymov.

Authorities had reported earlier that three policemen and one civilian had been killed in the attack. The three murdered police officers, who were 24, 28 and 42-year old, were all reportedly married with children.

A source at Almaty hospital told Reuters that six people had been killed in the shootout, while eight people were hospitalized, most of them in serious or critical condition.

It was initially reported that a group of people had attacked a police station in Almaty, triggering a manhunt in the city.

Two suspects have been detained. A weapon stolen from a killed police officer was reportedly found on one of them.

The suspected gunman, 26-year-old Ruslan Kulikbayev, was close to Salafis, an ultra-conservative school of Islam that he joined while in prison, the country’s National Security Committee chief said at a Security Council meeting on Monday. Kulikbayev had served two prison sentences, one for robbery in 2010 and another for illegal arms possession in 2012.

“He became affiliated with Salafis in prison, we are now seeing into the matter,” Zhumakanov said.

The attacker shot at the policemen in revenge for the time he spent in prison, the defense minister told reporters.

“During his time spent in prison he nursed a grudge against police officers and decided to take revenge upon them,” the minister said, adding that the information was obtained during the interrogation of the suspected gunman.

The second suspect detained by police turned out to be a taxi driver who drove Kulikbayev around the city, the defense minister said at the same meeting. The driver was forced to help the gunman and ran away at the earliest opportunity, he added.

“We detained him later,” the minister said.

As the events began to develop, witnesses reported on social networks that “an unknown person wearing black was shooting with assault rifle at police, trying to stop [their] car, and then ran in the eastern direction.”

“At first there were three or four single shots fired, and then there was a round. The unknown attacker ran away with an assault rifle (Kalashnikov), and the policemen ran after him,” employees at nearby offices told Bestnews.kz media outlet.

Предполагаемое фото одного из задержанных в алматы pic.twitter.com/P6nG545KaY — Михаил Козачков (@koza4koff) July 18, 2016

Задержание предполагаемого участника атаки на полицейских в алматы pic.twitter.com/1wYXV9LJ8q — Михаил Козачков (@koza4koff) July 18, 2016

Gunfire was heard in three districts of Almaty, security sources said, as cited by TASS new agency.

В больницы Алматы поступают раненые полицейские. По рассказам очевидцев, нападавшие стреляют только по силовикам pic.twitter.com/8eI6ZSBPAC — Михаил Козачков (@koza4koff) July 18, 2016

The areas near police headquarters, as well as near the Department of the National Security Committee have been blocked off by police, and the railway station was briefly closed.

A red level anti-terror alert was announced for the city, meaning the level of danger was critical. It is enacted only when authorities know that a terrorist act has been committed, and that there is still a possibility that more may take place.

An anti-terror operation was being conducted in Almaty, the local interior ministry said, while asking residents not to leave their apartments and avoid public places. Locals were also asked to inform police of any suspicious people, and treat the situation with understanding.

The operation is now over, and red level alert has been lifted.

READ MORE: Police arrest, kill radical Islamist gang, after attack on military base in Kazakhstan

Last month, two gun shops were robbed, a bus was hijacked, and a military base in the western Kazakh city of Aktobe came under attack from local Islamists, who killed seven people and wounded 37, most of whom were servicemen.

READ MORE: Kazakhstan issues nationwide ‘yellow’ terrorism alert after Islamist attack on military base

