Armenian Prime Minister Serzh Sargsyan has resigned following days of large-scale street protests against him.
"The street movement is against my tenure. I am fulfilling your demand," he said in a statement.
It is not clear when his resignation will take effect.
The announcement came soon after opposition leader Nikol Pashinyan was released from detention.
Mr Pashinyan had been arrested on Sunday after televised talks with Mr Sargsyan collapsed.
As well as Mr Pashinyan, two other opposition politicians and some 200 demonstrators were held.
In his statement published on his website, Mr Sargsyan said he was "addressing all citizens of the Republic of Armenia... for the last time as leader of the country."
"Nikol Pashinyan was right. I was wrong," he said. "The situation has several solutions, but I will not take any of them... I am leaving office of the country's leader, of Prime Minister."