Kyrgyz President Sooronbay Jeenbekov has resigned after days of protests following a disputed election that plunged the country into turmoil.
“I do not want to go down in Kyrgyzstan’s history as a president who shed blood and shot at his own citizens,” he said in a statement.
Kyrgyzstan has been in crisis since parliamentary elections on 4 October.
Subsequent protests forced electoral officials to annul the results, and also toppled the government.
Mr Jeenbekov becomes the third president of the Central Asian state, which gained independence from the Soviet Union in 1991, to be ousted by a popular uprising since 2005.
As he left office he called for peace, warning that Kyrgyzstan was close to conflict.
“The military and security forces will be obliged to use their weapons to protect the state residence. Blood will be inevitably shed. I urge both sides not to fall for provocations,” he said.
He also called on newly-appointed Prime Minister Sadyr Japarov and other opposition politicians to “take their supporters away” from the capital so that peace could return to Bishkek.
The unrest began after demonstrators took to the streets of the capital and stormed government buildings, demanding a new vote and the resignation of Mr Jeenbekov, who is pro-Russia.
They said the election results had been rigged – claims which international monitors said were “credible” and a cause for “serious concern” – as rival groups clashed for power, with several politicians making bids to become prime minister.
More than 1,200 people have been injured and one person has been killed in street clashes since protests erupted.
On Wednesday Mr Jeenbekov gave his approval to the new PM’s appointment after parliament voted for him a second time.
Mr Japarov is a nationalist politician who had been serving a prison sentence until he was freed by supporters last week.
The new prime minister insisted on his rival departing office, and his supporters defied a state of emergency to march on the president’s residence on Thursday, supported by the military.
Kyrgyzstan’s speaker of parliament takes over as interim head of state, but Mr Japarov’s supporters want him to resign too, leaving the PM as the country’s main leader, the BBC’s Alm