A court in Kyrgyzstan has ordered the country's former president held in pretrial detention after he was seized from his compound in raids that left one person dead and plunged the country in crisis.
The Central Asian state, which has seen two revolutions in less than two decades, is caught in a standoff between ex-leader Almazbek Atambayev and his protege-turned-foe President Sooronbai Jeenbekov.
Special forces this week launched two major operations to take Atambayev from his residence outside the capital Bishkek after he refused to be questioned in cases that supporters say are politically motivated.
The first raid on Wednesday failed after descending into deadly violence, but in the second on Thursday he was detained.
A court in Bishkek late Thursday ordered the 62-year-old Atambayev held until August 26, a court spokesman said, but did not specify what he had been charged with.
Atambayev's lawyer Sergey Slesarev told AFP that the court decision was connected to the illegal release from jail of a well-known crime boss during Atambayev's presidency. 
Kyrgyzstan's state prosecutor on Thursday named the freeing of ethnic Chechen underworld figure Aziz Batukayev in 2013 as one of the five criminal cases in which Atambayev is named. 
"These charges are baseless... we intend to take our case to international courts," Slesarev said. 
The lawyer argued that his client still enjoys immunity from prosecution according to the constitution, despite parliament voting to strip him of this privilege in June.
A funeral service was also held for Usen Niyazbekov, a special forces officer who died from a gunshot wound sustained in the clashes between security services and Atambayev's supporters.
Around 100 others were injured in the two raids, the health ministry said.
The clashes that erupted at the former leader's residence during the raids on Wednesday and Thursday have triggered several new criminal probes. 
These saw several of Atambayev's closest aides and his son Seitbek Atambayev called in for questioning Friday. 
Omurbek Babanov, a political heavyweight who ran against Jeenbekov in the 2017 presidential election, sparked fears of escalation when he announced he would return to the country from Russia, despite himself facing criminal investigations.
The State Committee for National Security said charismatic magnate Babanov would "be held accountable" on his return.
But law enforcement did not detain Babanov on his arrival at the country's main airport where he was greeted by a throng of cheering loyalists and several lawmakers.
"I have always followed the law. If I am invited (for questioning) then I am ready to go with a lawyer," he said as he appeared outside Manas airport. 
Babanov's supporters argue the criminal cases against him -- one for inciting inter-ethnic hatred and one for calling for the overthrow of the government -- were trumped up to blacken his reputation during the bitter 2017 campaign.
Jeenbekov and Atambayev were once friends, and the former leader backed the incumbent in the 2017 election against Babanov, triggering accusations that administrative resources were used to sway the vote. 
That vote marked an unprecedented peaceful transfer of power between heads of state in the Muslim-majority nation of six million people.
But the pair fell out just months after Jeenbekov's inauguration as Atambayev publicly criticised his successor and security services arrested several key Atambayev allies.
Supporters took to the streets of central Bishkek on Thursday, blocking a key thoroughfare in the city of one million and setting alight trash containers. 
Police said in a statement on Friday they were in full control of the city having spent the night dispersing Atambayev's supporters. 
The standoff has drawn in Russia -- the country's Soviet-era master and traditional political patron -- where hundreds of thousands of Kyrgyz work as migrant labourers. 
Last month Russian President Vladimir Putin met with both Jeenbekov and Atambayev in Moscow in a bid to defuse the confrontation. 
Russia's Prime Minister Dmitry Medvedev arrived in Kyrgyzstan Thursday for a meeting of a regional trade bloc and said he hoped the situation would stabilise.
Kyrgyzstan "has already reached its limit for revolutions," Medvedev said.