Protesters in Sri Lanka stormed the prime minister's office on Wednesday despite tear gas, water cannon and a state of emergency after the country's embattled president fled overseas.
The crowd demanded that both men step down because of an economic crisis.
Prime Minister Ranil Wickremesinghe said in a televised statement that he had instructed the military and police to do "what is necessary to restore order".
Armed security personnel stood by in the grounds of his office as protesters, some holding national flags, milled and took pictures.
Other demonstrators at one point broke into state TV studios, as the country's months-long political and economic crisis appeared to be moving towards a climax.
President Gotabaya Rajapaksa, 73, promised at the weekend to resign on Wednesday after escaping his own official residence in Colombo just before tens of thousands of protesters overran it.
He flew to the neighbouring Maldives early on Wednesday. As president he has immunity from arrest, and he is believed to have wanted to go abroad before stepping down to avoid the possibility of being detained.
But midnight passed with no announcement that he had resigned.
In his absence he named as acting president Mr Wickremesinghe.
"Go home Ranil, Go home Gota," they shouted.
Tear gas and water cannon fired by police and the declaration of a nationwide state of emergency and a curfew failed to disperse them and the crowd poured into the building.
One protester was killed because of suffocation from tear gas, police said.
Mr Wickremesinghe, also 73, would automatically become acting president if Mr Rajapaksa steps down, but has announced his willingness to resign if consensus is reached on forming a unity government.
"We can't tear up our constitution," he said. "We can't allow fascists to take over. We must end this fascist threat to democracy."
Mr Wickremesinghe said the state had to re-establish control over the official buildings occupied by protesters.
The demonstrators' actions were a repeat of the capture of the president's home and office on Saturday, when Mr Wickremesinghe's private home was also set ablaze.
The presidential succession process could take between three days — the minimum time needed for parliament to elect an MP to serve out Mr Rajapaksa's term, which ends in November 2024 — and a maximum of 30 days allowed under the statute.
Mr Rajapaksa is accused of mismanaging the economy to a point where the country ran out of foreign exchange to finance even the most essential imports, leading to severe hardships for its 22 million people.
Earlier on Wednesday, smiling Sri Lankans again thronged the corridors of the president's official residence after he flew out of the country, with young couples walking hand in hand in a mood of quiet celebration.
"People are very happy, because these people robbed our country," said retired civil servant Kingsley Samarakoon, 74.
"They've stolen too much money, billions and billions."
But Mr Samarakoon held little hope for an immediate improvement in Sri Lanka's plight.
"How are people going to run the country without money?" he asked. "It's a problem."
Sri Lanka defaulted on its $51 billion foreign debt in April and is in talks with the IMF for a possible bailout.
The island has nearly exhausted its already scarce supplies of petrol. The government has ordered the closure of non-essential offices and schools to reduce commuting and save fuel.
The departure of Mr Rajapaksa, once known as "The Terminator", had been stymied for more than 24 hours in a humiliating standoff with immigration officers in Colombo.
He had wanted to fly out on a commercial flight, but staff at Bandaranaike International withdrew from VIP services and insisted that all passengers had to go through public counters.
Mr Rajapaksa's youngest brother, Basil, who resigned in April as finance minister, missed his own flight out on Tuesday after a tense stand-off of his own with airport staff.
The leader of the main opposition Samagi Jana Balawegaya party, Sajith Premadasa, who lost the 2019 presidential election to Mr Rajapaksa, has said he will stand for the presidency.
Mr Premadasa is the son of former president Ranasinghe Premadasa, who was assassinated in a Tamil rebel suicide bombing in May 1993.