Venezuela’s new Constituent Assembly granted itself wide powers to write and pass legislation on Friday, a move that essentially nullifies the opposition-led legislature and puts President Nicolás Maduro’s party firmly in control of the country.

In a decree, the assembly said it would “assume the ability to legislate over matters directly related to guaranteeing peace, security and sovereignty,” as well as a long list of other areas.

The move enables the Constituent Assembly to supersede the country’s legislature, the National Assembly, which has been led by opposition parties since last year and is the only branch of government not controlled by Mr. Maduro.

It is a decisive step in the quest by Mr. Maduro’s allies to dismantle the country’s legislature, an effort that began in March with an attempt to dissolve it using the court system and shifted last month to a vote to create the powerful Constituent Assembly, which could supplant the legislature.