Two lawmakers in Venezuela have both declared themselves parliamentary Speaker after a tumultuous day in the country's politics.
US-backed opposition leader Juan Guaidó and rival Luis Parra both claimed to be Speaker of the National Assembly on Sunday.
Mr Guaidó, who was aiming to be re-elected to the post, was stopped from entering parliament by national guards.
Images showed him trying to climb an iron fence to get into the building.
How did we get here?
Last January, Mr Guaidó declared himself Venezuela's interim president - a move that was quickly backed by almost 60 countries, including the US and UK - after disputing President Nicolas Maduro's 2018 re-election.
His position at the head of the opposition-led National Assembly was the basis of his claim to be Venezuela's legitimate head of state.
But after a year of failed attempts to oust President Maduro, he has been struggling to maintain unity among the opposition.
Mr Maduro, meanwhile, has maintained his position despite intense domestic and international pressure, thanks largely to support from the Venezuelan military.
On Sunday he was quick to back Luis Parra, a former Guaidó ally, saying Mr Guaidó had been "kicked out of the National Assembly by the votes of his own opposition".
State broadcasters later described Mr Parra as the new Speaker.
The handling of the vote was condemned by the US, the EU, and several Latin American nations.
Before the vote, Mr Guaidó had accused the government of attempting to thwart his re-election by bribing and intimidating politicians.
Mr Parra, however, told state television the session was opened without Mr Guaidó because he had not arrived.
Why does Guaidó claim victory?
Mr Guaidó said that only pro-government politicians and opposition deputies critical of him had been allowed to enter parliament, where the vote was scheduled, and that security forces had set up barricades in central Caracas.
After he was blocked from entering the National Assembly, Mr Guaidó held an improvised parliamentary session in the offices of El Nacional, a pro-opposition newspaper.
Opposition lawmakers attended and voted to elect him as Speaker. Their tally said 100 of parliament's 167 legislators had voted in his favour.
Mr Guaidó took an oath of office at the scene.
The US, which recognises Mr Guaidó as Venezuela's legitimate leader, sent him congratulations.
"I congratulate Juan Guaidó on his re-election as president of the Venezuelan National Assembly and condemn the failed efforts of the former Maduro regime to negate the will of the democratically-elected National Assembly," US Secretary of State Mike Pompeo said.
"The United States and 57 other countries continue to regard him as the legitimate leader of the National Assembly and thus the legitimate interim president of Venezuela."
In December, Mr Guaidó had vowed to investigate alleged wrongdoing by National Assembly politicians, including Mr Parra, for unduly advocating for a businessman linked to President Maduro's government.