Caracas (AFP) - Venezuela's military pledged loyalty to President Nicolas Maduro on Thursday, ramping up a high-stakes standoff between his socialist government and a center-right opposition that has vowed to use its new legislative powers to oust him.

The opposition laid claim to a big majority in the National Assembly, which could empower it to force out Maduro. He has rejected the assembly as illegal and formed a new hardline leftist cabinet to fight it, in a deepening political crisis.

Venezuela's defense minister and armed forces chief, General Vladimir Padrino, weighed in, saying the military was unwavering in its backing for Maduro -- who has vowed to resist "with an iron hand."

"The president is the highest authority of the state and we reiterate our absolute loyalty and unconditional support for him," said Padrino, after the under-pressure government sued to stop the emboldened opposition using its newfound powers to kick out Maduro.

The pledge from the armed forces will only ratchet up fears of unrest in the South American oil-producing country, which is stricken by recession, shortages and rampant crime.

The new speaker of the congress, Henry Ramos Allup, said on Twitter that two premises of his Democratic Action party were attacked with explosive devices, but no one was hurt and no damage reported. He said police were investigating.

Padrino lashed out at the opposition after Ramos Allup had portraits of late president and socialist icon Hugo Chavez removed from the assembly building on Wednesday.

"This is an outrage to military honor," he warned.

The government side also responded by pledging to fill the streets of Caracas with pictures of Chavez and of Simon Bolivar, Venezuela's 19th-century independence hero.

- 'Illegal parliament' -

On a day of fast-moving developments in Venezuela, Maduro's side applied to the Supreme Court to declare null any legislation passed by the opposition-controlled congress.

Maduro supporters say the opposition's two-thirds majority in the assembly is not legitimate since it swore in three lawmakers whom the court had ordered to be suspended pending allegations of electoral fraud.

Story continues

"The decisions made in that circus they have set up should be ignored," said pro-government deputy Pedro Carreno at the court, where he presented the suit.

"This is an illegal parliament and therefore its decisions are illegal and null."

He accused the opposition of planning a "coup d'etat" and being in contempt of court.

Ramos Allup rejected the charge.

"The ones who are in contempt are the ones who have disregarded the public will after the elections," he said.

The opposition MUD coalition won a majority in the assembly for the first time in nearly 17 years at elections on December 6.

The MUD has vowed to find a way within six months to get rid of Maduro by constitutional means. But Maduro's side vowed to block it by suing, withholding funding and refusing to publish its legislation.

"They give us six months to survive. You need balls to carry out a coup d'etat. We'll see if they have any," said Diosdado Cabello, the number two in Maduro's leadership.

"Get ready for a long struggle."

- Bleak economic outlook -

As the battle lines formed, Maduro reshuffled his cabinet, filling key posts with defenders of the socialist "revolution" launched by his late predecessor Chavez.

Facing a "new stage of the revolution" and a "bourgeois legislature," Maduro said his new cabinet team would work on the "grave economic situation."

He appointed hardline socialists to the key posts of economy, finance and foreign trade and investment, while keeping in place his oil minister.

He named economist Luis Salas economy minister.

Ramos Allup said the opposition too would present urgent economic proposals.

Analysts warn the political deadlock will compound the hardship of Venezuelans who are suffering shortages of basic goods and soaring inflation.

Plunging oil prices have sharply curbed the country's revenues.

"The president's support for the radical ideological wing of Chavismo, sidelining pragmatists, does not generate positive expectations for change," said analyst Luis Vicente Leon, head of polling firm Datanalisis.

"Expectations of institutional conflict increase the negative outlook for the nation's economy."

One of the first measures the opposition wants to pass is an amnesty for 75 political prisoners, a plan backed by the United States. Maduro has vowed to veto that move.