A recent tussle between Maduro loyalists and the U.S.-backed opposition for control of Venezuela’s National Assembly descended into a melee of competing claims that left neither side with clear authority over the assembly. Behind the messy scramble, energy consultants and diplomats say, is a government attempt to ensure its long-term survival by bringing in Russian, Chinese and other investors to revive the country’s collapsing crude production.

The assembly, the last independent institution in Venezuela, is the only government body legally able to approve oil-licensing deals. The government’s attempted takeover was partly a strategy to draft a law that would give foreign companies the legal power to run day-to-day operations of oil projects in Venezuela, according to two oil-sector consultants close to Russian and Chinese energy companies.

Such a law would break from the nationalist policies adopted by President Nicolás Maduro’s leftist predecessor, the late Hugo Chávez, who gave state oil monopoly Petróleos de Venezuela, or PdVSA, mandatory operational control and majority financial stakes.

“This whole operation reflects the extreme necessity of the regime to try and give legitimacy to contracts, especially in the oil sector,” said Luis Stefanelli, a lawmaker who led the assembly’s energy commission before recently joining nearly three dozen of his colleagues in exile to escape state persecution.