In February, after CNN en Español, the network’s Spanish language channel, broadcast an investigation that linked Venezuela’s vice president to a passport fraud scheme in the Middle East, Mr. Maduro ordered the channel off the air. The government has blocked the Caracas bureau chief of The New York Times from entering the country since October.

But to many, the gradual assault against the National Assembly, more than a year in the making, was the most telling sign of democratic erosion in Venezuela.

“It has come in fragments,” Carlos Ayala Corao, a Venezuelan lawyer and legal analyst, said of the court’s actions against the legislature. “They have been slicing it in pieces.”

The conflicts began in December 2015, when rising grievances about the country’s faltering economy propelled Mr. Maduro’s opposition to win control of the legislature. It was the first time in years that the chamber was not dominated by the movement founded by the former leftist President Hugo Chávez.

Mr. Maduro initially said he accepted the vote. He even appeared before opposition lawmakers to give his annual address on the state of the government in January of last year. But the Supreme Court, packed with loyalists to Mr. Maduro shortly before the National Assembly took power, was chipping away at the chamber’s powers.

It refused to let it seat four lawmakers on the grounds that there had been voting irregularities. That denied the opposition of a supermajority, which would have given it expanded powers over Mr. Maduro. The National Assembly went back and forth on the ruling, but eventually complied.

As the National Assembly began to get to work, it continued to clash with the court. By last spring, the legislature had written laws delivering on campaign promises like one measure to invigorate the economy and another to free more than 100 political prisoners, only to see the court overturn them as unconstitutional.