CARACAS — Lawmakers aligned with Venezuela’s repressive leader, Nicolás Maduro, began an attempt to consolidate his grip on the nation on Sunday by wresting control of the National Assembly, the last political institution still dominated by the opposition.

In a chaotic session in which security forces surrounded the National Assembly building, intimidating members of the opposition who tried to enter, supporters of Mr. Maduro blocked the re-election of Juan Guaidó, the opposition leader, as the body’s head, and named another legislator instead.

Members of the Venezuelan opposition immediately denounced the effort, calling it a “parliamentary coup d’état” and saying there had been no quorum to call the vote.

The Maduro administration’s plunges the country’s already turbulent political situation further into chaos, raising questions about who controls the assembly and whether Mr. Guaidó can continue to assert that he is the Venezuela’s interim president, in a direct challenge to Mr. Maduro.