Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

CARACAS, Venezuela — Venezuela's socialist government installed a new head of Congress on Sunday after armed troops blocked opposition legislators from entering parliament, in a move condemned by dozens of nations as an assault on democracy.

Troops with riot shields blocked opposition leader Juan Guaidó from entering parliament for what was expected to be his re-election as head of Congress, at one point pulling him off the compound's iron railings after he tried to push past security forces.

The blockade allowed the ruling Socialist Party to hand the post to legislator Luis Parra, who was recently expelled by an opposition party over corruption allegations.

The gambit by the government of President Nicolás Maduro was slammed by the United States, the European Union and a dozen Latin American nations.

Opposition legislators quickly re-elected Guaidó - who is recognized by dozens of nations as Venezuela's rightful leader - in a session at the headquarters of a pro-opposition newspaper.

But the move may further weaken the opposition's already flagging campaign to oust Maduro, and creates two competing leaders of parliament in a nation caught in a political standoff and suffering a hyperinflationary economic collapse.

"Today the dictatorship has committed another blunder," Guaido said after taking the oath of office at the offices of El Nacional newspaper. "Today we once again soundly defeated the plans of the dictatorship."

The opposition's tally showed 100 of parliament's 167 legislators voted in his favor.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Guaido last year led a groundswell movement to push Maduro from power, denouncing his 2018 re-election as a fraud and assuming a parallel presidency that quickly won the recognition of most Western and Latin American nations.

But Maduro has clung to power, thanks to continued support from the military and the backing of China, Cuba and Russia. He has denounced Guaido as a U.S. puppet.

Parliament melee

U.S. Secretary of State Mike Pompeo on Sunday night congratulated Guaido for winning a second term.

"Venezuela's political parties came together in a resounding display of unity to support Juan Guaido's re-election," Pompeo said in a statement. "No regime thugs, no jail cells, and no bribery or intimidation can subvert the will of the Venezuelan people."

Opposition legislators on Sunday spent much of the morning attempting to get past checkpoints in downtown Caracas at which police and troops stalled their advance and blocked a group of them from entering the historic Congress building.

Socialist Party legislators, in the absence of Guaido and other legislators, took control of the session and nominated Parra as the new Congress chief.

Following a melee on the floor of parliament, an impromptu vote was held through a show of hands but without counting each individual vote, as required by its regulations, according to a Reuters witness.

Venezuela's state television broadcast an improvised swearing-in ceremony for Parra, who was expelled last year from opposition party First Justice for allegedly helping burnish the reputation of a businessman associated with Maduro's government.

Parra denies the charges. Since his expulsion, he has been harshly critical of Guaido and has described himself and other legislators as being in "rebellion."

"We announced this morning before entering the legislative palace that the rebellion by the deputies ... would be clearly expressed," Parra said on Sunday in comments on state television.

Maduro, who donned a baseball uniform to inaugurate a new stadium on Sunday evening, said Congress had chosen new leadership out of frustration with Guaido.

"Mike Pompeo and Elliott Abrams should explain to Donald Trump why they lost the leadership of the National Assembly, one more failure by the gringos in Venezuela," Maduro said, referring to the Secretary of State and the U.S. special representative for Venezuela.

The events were also condemned by the Lima Group, an organization of Latin American nations that seeks political change in Venezuela. Argentina, which recently elected a leftist government, also condemned the day's events.