Kazakhstan said Saturday its former security chief had been arrested for suspected treason during days of unrest, as Russia hit back at US criticism of its deployment of troops to the crisis-hit country.

News of the detention of Karim Masimov, a former prime minister and longtime ally of Kazakhstan's ex-leader Nursultan Nazarbayev, comes amid speculation of a power struggle in the ex-Soviet Central Asian nation.

The domestic intelligence agency, the National Security Committee (KNB), announced that Masimov had been detained on Thursday on suspicion of high treason.

President Kassym-Jomart Tokayev sacked Masimov earlier this week after protests over rising fuel prices erupted into widespread violence, with dozens killed and government buildings in the largest city Almaty stormed and set ablaze.

Protests over rising fuel prices erupted into violence in Kazakhstan's Almaty this week
Protests over rising fuel prices erupted into violence in Kazakhstan's Almaty this week AFP / Alexandr BOGDANOV

The CSTO has been dispatching several thousand troops to Kazakhstan, including Russian paratroopers, who have been securing strategic sites.

Tokayev says the deployment will be temporary, but US Secretary of State Antony Blinken warned on Friday that Kazakhstan may have trouble getting them out.

"I think one lesson in recent history is that once Russians are in your house, it's sometimes very difficult to get them to leave," Blinken told reporters.

Former security chief Karim Masimov has been arrested for suspected treason during the unrest
Former security chief Karim Masimov has been arrested for suspected treason during the unrest AFP / Loic VENANCE

The Russian foreign ministry slammed his comments as a "boorish" attempt "to make a funny joke today about the tragic events in Kazakhstan".

"When Americans are in your house, it can be difficult to stay alive, not being robbed or raped," it alleged.

Tensions between Moscow and the West are at post-Cold War highs over fears of a Russian invasion of Ukraine, with talks between Russia and the US to take place in Geneva on Monday.

Authorities in Kazakhstan said Friday that the situation was largely under control, but Tokayev issued a shoot-to-kill order and rejected any negotiations with protesters.

Critics have accused ex-leader Nursultan Nazarbayev of staying in control behind the scenes
Critics have accused ex-leader Nursultan Nazarbayev of staying in control behind the scenes AFP / NICHOLAS KAMM

An AFP correspondent in Almaty said the city was quiet but tense on Saturday, with security forces firing warning shots at anyone approaching a central square.

Masimov, 56, twice served as Nazarbayev's prime minister and had been head of the KNB since 2016.

He was fired at the height of the unrest on Wednesday, when Tokayev also took over from Nazarbayev as head of the powerful security council.

Nazarbayev's spokesman Aidos Ukibay on Saturday denied rumours the ex-president had left the country and said he was urging Kazakhs to "rally around the president".

Denouncing those spreading "knowingly false and speculative information," he said the ex-leader was in the capital Nur-Sultan and in "direct contact" with Tokayev.

An AFP correspondent in Almaty said the city was quiet but tense on Saturday
An AFP correspondent in Almaty said the city was quiet but tense on Saturday AFP / Alexandr BOGDANOV

In a hardline address to the nation on Friday, Tokayev said 20,000 "armed bandits" had attacked Almaty and authorised his forces to shoot to kill without warning.

The initial cause of the protests was a spike in fuel prices but a government move to lower the prices and the sacking of the cabinet failed to stop demonstrations continuing.

The violence erupted when police fired tear gas and stun grenades at thousands protesting in Almaty late on Tuesday.

The next day protesters stormed government buildings including the city administration headquarters and presidential residence, setting them ablaze, and a nationwide state of emergency was declared.

The interior ministry said 26 "armed criminals" had been killed in the unrest.

It said 18 security officers had been killed and more than 740 wounded.

More than 4,000 people have been detained, including some foreigners, the ministry says.

The full picture of the chaos has often been unclear, with widespread disruptions to communications including days-long internet shutdowns.

Flights into the country have been repeatedly cancelled and Almaty's airport will remain closed indefinitely to civilian planes, local media reported, after the facility earlier suggested it could resume operations as soon as Monday.

In Almaty, few people were out on the streets on Saturday.

The military continued to guard the square adjacent to the burnt-out mayor's office, firing warning shots whenever passersby were slow to heed instructions to stay away.

Pensioner Leonid Kiselyev, 68, said his car had been hit by gunfire at around 8:30 am as he drove past, showing a bullet that had pierced the boot.

"Yesterday it was calm so I drove here," said a shaken Kiselyev, standing in a long queue at a petrol station.

Israel's foreign ministry said a 22-year-old Israeli citizen who had been living in Kazakhstan for several years was killed by gunfire on Friday night.

Much of the public anger appeared directed at Nazarbayev, who is 81 and had ruled Kazakhstan since 1989 before handing over power.

Critics have accused him and his family of staying in control behind the scenes and accumulating vast wealth at the expense of ordinary citizens.