SAO PAULO, May 27 (Reuters) - Arthur Lira, head of Brazil's lower house, said on Friday the federal government may sell shares it owns in state-run oil company Petrobras and stop being the majority shareholder.

Lira mentioned this possibility after being questioned about the advance of a proposal in the legislative branch to privatize Petrobras, formally known as Petroleo Brasileiro SA, in an interview with a local media.

He said there might not be enough time before the October elections or willingness for Congress to vote on a constitutional amendment for Petrobras' privatization in such a polarized country like Brazil.

On Monday, President Jair Bolsonaro's government ousted its chief executive for Petrobras for the second time in two months and signaled plans to alter the company's market-based fuel pricing policy.

Bolsonaro's chief of staff Ciro Nogueira said on Tuesday that the president is "anguished" by rising fuel prices and the company's pricing policy must now be aligned with the views of a new energy minister, who took office this month.

The constant rise in fuel prices has been the main driver of a surge in inflation, which is at 12%, and has been a sore point for Bolsonaro, affecting his approval ratings five months before the Presidential elections, when he will run again. Lira is one of the president's main allies.

Petrobras shares fell on Friday after Bolsonaro signaled a wide shake-up of the company's board and executive team amid rising dissatisfaction with high fuel prices. (Reporting by Ricardo Brito Writing by Steven Grattan Editing by Mark Potter)