By JOSHUA GOODMAN, Associated Press Writer

MIAMI (AP) — Allies of Venezuelan President Nicolás Maduro attempted to orchestrate a takeover of the opposition-controlled congress Sunday as opposition leader Juan Guaidó was blocked by security forces from presiding over the start of the legislative year. Here’s a look at what happened and where things stand following what has been condemned internationally as an attempted coup against the country's last democratic institution.

WHAT HAPPENED?

At the start of every year, lawmakers gather in a special session to elect the National Assembly’s leadership. Opposition leader Juan Guaidó was expected to easily win re-election thanks to a solid majority in the 167-seat chamber. But as security forces blocked him from entering the building, socialist lawmakers put forward an alternative slate led by Luis Parra, who was recently banished from the opposition on suspicion of taking bribes.

WAS THE VOTE VALID?

Maduro’s allies maintain they proceeded according to parliamentary rules and that Guaidó staged the whole episode - including an attempt to scale a spiked iron fence surrounding the parliament - because he knew he didn’t have the support to get re-elected. However, the session lacked quorum and as a result didn’t even officially get under way. Instead there was a rushed show of hands when a few dozen socialist lawmakers stormed the dais, proclaiming Parra the new president. Later in the day, Guaidó’s leadership was ratified by 100 lawmakers who gathered in an emergency session at a Caracas newspaper.

WHY WAS THE TAKEOVER OF CONGRESS IMPORTANT?

Maduro has a firm grip on almost every institution in Venezuela including the electoral council, supreme court and, most importantly, the armed forces. But as he’s ridden out the repeated attempts by the opposition to oust him, he’s set his eyes on the one institution he doesn’t control and that is recognized as Venezuela’s sole legitimate authority by more than 50 countries: the National Assembly. Even before Sunday’s attempted takeover, Maduro had been hinting he would call early legislative elections, betting that Guaidó would follow through on a pledge to boycott any election with Maduro still in power.

WHAT HAS BEEN THE INTERNATIONAL RESPONSE?

Maduro’s seizure of congress was roundly condemned by the U.S., European Union and several Latin American states. Secretary of State Mike Pompeo called the vote “farcical.” Even Mexico and Argentina - whose leftist leaders have taken distance from the U.S.-led effort to pile on Maduro - condemned the move. But Russia, Maduro’s chief patron, said Parra’s election was legitimate, an endorsement that could pave the way for badly need loans.

WHAT’S NEXT?

Maduro’s opponents, dozens of whom are jailed or in exile, are bracing now for another crackdown. Ironically, that could provide a short-term boost to Guaidó, who had been struggling to maintain unity amid falling poll numbers. In a surprise reversal, hardline lawmakers threw their support behind Guaidó on Sunday while moderates like former presidential candidate Henrí Falcon, who had been quietly fuming against his leadership, said there can be no dialogue with the government in the wake of Sunday’s “shameful spectacle” by Maduro.

IS MADURO ANY CLOSER TO BEING OUSTED?

While Sunday’s events were dramatic, there appears to be little appetite for resuming the mass protests that a year ago emboldened Guaidó to declare himself interim president. So the stalemate is likely to continue. Maduro is incapable of resolving entrenched problems like power outages, collapsing oil production and shortages that have worsened under U.S. sanctions. But he is benefiting from the relative stability arising from the de facto dollarization of large swaths of the oil economy. “Without protests or control of parliament, Guaidó has little bargaining power,” said Phil Gunson, a Caracas-based analyst for the International Crisis Group.