After a trucker's strike over rising diesel prices paralysed Latin America's largest economy, the government reacted by imposing fuel subsidies, worrying investors who saw it as a sign of new, unwelcome interference in state-run Petrobras.

Parente resigned in protest, and former chief financial officer Ivan Monteiro was installed in his place on Friday, providing some comfort to jittery markets which hope he will press on with Parente's market-friendly program.

Shares in Petrobras - formally called Petroleo Brasileiro SA - rose more than 8 percent on Monday, helped by the decision to name Monteiro CEO as well as by some bargain-hunting after the shares lost about a fifth of their value.

However, it is unlikely that 57-year-old former bank executive Monteiro will be able to escape government pressure, analysts said in the days following his appointment.

Monteiro may want to turn Petrobras into a streamlined profit machine - but outgoing President Michel Temer and other politicians are scrambling to appease angry voters ahead of presidential polls in October.

"Ivan Monteiro will be under serious political pressure because of the elections," said Edmar Almeida, an energy professor at the Federal University of Rio de Janeiro. "Candidates who are against asset sales, for example, will push hard against any major Petrobras decision on divestments."

Petrobras was not immediately available to comment. A spokesman for the president's office said that the government would not meddle in pricing.

Temer effectively ended the truckers' protest after he promised to cut diesel prices by about 12 percent for 60 days through a mix of tax cuts and subsidies to Petrobras. The government also agreed to restrict price changes at the pump, reimbursing Petrobras for related losses.

In another sign of a heavier government hand, the Mining and Energy Ministry said on Friday it was seeking a mechanism to "protect the consumer from the volatility of fuel prices at the pump."

But details have been scarce as to how Petrobras will be compensated and investors are wary of further meddling, especially steps that could extend beyond diesel to gasoline.

The diesel subsidy plan and Parente's exit "have all raised questions and increased the risk perception of political interference," analysts at Brazilian bank Itau said in a client note.

A wide-open election will add further pressure on the government to keep voters happy. Leftist candidate Ciro Gomes said in a video: "It is not enough for Parente to go, it is necessary to demand that the pricing policy that he imposed be changed."

Parente had insisted as a condition of taking the debt-laden and scandal-tarnished company's helm in 2016 that he control how Petrobras priced fuel.

Monteiro, seen by oil companies and investors as an avid supporter of changes sought by Parente, is not expected to get the same carte-blanche from the government as his predecessor, as the political mood in Brasilia has shifted.

"Future reforms are going to be met with a jaundiced eye," said Allen Good, an analyst at Morningstar.

REFINERY SALES

More than just potential losses from fuel pricing are at stake. Petrobras is hoping to sell majority stakes in four refineries, but possible investors are already spooked by the prospect of competing with a company that is forced to sell fuel below cost, sources told Reuters last month.

An aggressive two-year divestment target of $21 billion by the end of 2018, part of a bid to cut debt, could also be in play.

But a round of bidding for oil blocks in Brazil's choice offshore basins on Thursday is not expected to be affected, say oil majors, who will likely partner with Petrobras to win some of the blocks.

And some see potential benefits from Parente's exit, including the possibility of a quicker conclusion to a drawn-out dispute with the government over the value of the offshore transfer-of-rights area, where Petrobras paid top dollar to produce 5 billion barrels of oil.

Oil majors are watching the negotiations closely, because a resolution could unlock an auction of nearby areas, considered to be some of the finest geology in Brazil's pre-salt play.

"I would guess the transfer-of-rights will be resolved because Ivan is more compliant than Pedro Parente," said John Forman, former chief of oil regulator ANP. "He will yield more easily."

(Reporting by Alexandra Alper; Additional reporting by Anthony Boadle, Editing by Christian Plumb and Rosalba O'Brien)

By Alexandra Alper and Marta Nogueira