The chief executive and other senior management at Brazil's Petrobras resigned on Wednesday amid a festering corruption scandal, unleashing a scramble to find replacements capable of restoring investor confidence in the state-run oil company.

The firm's board of directors will meet on Friday to elect a new management team to replace CEO Maria das GraEcas Foster and five other senior executives, Petrobras said in a securities filing.

Petrobras shares rose more than 6 percent in early trading in Sao Paulo on the news before paring gains to trade about 1 percent higher near mid-day. The stock rose more than 15 percent on Tuesday - its biggest one-day gain in 16 years - helped by reports that President Dilma Rousseff had decided to dismiss Foster by the end of the month.

The timing of the resignations came as a surprise to the Rousseff administration, which was hoping for more time to find potential replacements, a government source told Reuters on condition of anonymity.

Rousseff had already asked Finance Minister Joaquim Levy, a University of Chicago-trained economist, to help sound out potential candidates for a new Petrobras leadership team, another government source told Reuters on Tuesday.

Investors have been betting that new leadership will help restore credibility to the scandal-tainted firm and ramp up production and boost profit.

“GraEca (Foster) was not the biggest problem at the company, but it's a message,” said JoIao Pedro Brugger, equities analyst at Leme Investimentos in FlorianDopolis, Brazil. “The company is trying to tell the market that its management will become more professional.”

Doubts remain

Pressure has been mounting on Rousseff to clean up Petrobras, whose reputation suffered with the arrest and testimony of three former senior executives and three dozen others, including executives of major suppliers.

Rousseff's political opponents, who saw Foster as the president's last line of defense, have sped up efforts to launch congressional investigations into the Petrobras kickback scheme, seeking to hold her government responsible for the corruption.

The scandal will move closer to Rousseff later this month when prosecutors plan to name politicians of her ruling Workers' Party and coalition allies who allegedly received graft proceeds as campaign contributions.

The illegal activity, authorities allege, diverted at least $3.7 billion and perhaps more than $28 billion from Petrobras coffers.

Petroleo Brasileiro SA, as Petrobras is formally known, said last week that the corruption was one of several factors that helped wipe out a net 61.4 billion reais ($22.7 billion) from the value of its assets, such as refineries and oil platforms, but it refused to take a charge against earnings.

For the shares to continue rising, Petrobras will have to do much more than just appoint new senior management, said Leonardo Alves, analyst with Votorantim Corretora in SIao Paulo.

“We believe replacing Foster will not solve the company's problems,” Alves wrote in a note to clients. “There are still too many risks regarding the corruption scandal, and we are not fully convinced that the new chief executive will necessarily be an improvement.”