(Adds analyst comment, market reaction)
By Marta Nogueira and Alexandra Alper
RIO DE JANEIRO, Nov 6 (Reuters) - Brazil's Petroleo Brasileiro SA on Tuesday reported a surge in third-quarter net profit that still lagged forecasts as oil prices rose but spending at the state-owned company jumped.
Petrobras made a net profit of 6.644 billion reais ($1.78 billion), well above the 266 million reais it posted a year earlier, but shy of a $1.98 billion average Refinitiv IBES estimate.
Analysts were particularly concerned by a 50 percent cut in free cash flow to 8.115 billion reais from the prior quarter, as Petrobras boosted capital spending and made a second payment as part of the settlement of a class action lawsuit over graft in January.
"We have a negative view," Goldman Sachs said in a client note. The lower free cash flow "mainly reflects the pick-up in capex in order to revert the negative trend in production," it said.
Petrobras shares fell 2.6 percent to 27.4 reais per share in midday trading.
Petrobras oil output slid in September by 13 percent compared with the same period last year while the results report on Tuesday showed investment rose to 15.441 billion reais from 10.434 billion reais in the same period last year.
Petrobras said its growing share of the domestic diesel market provided an earnings boost, as a diesel subsidy program put in place in June to resolve a truckers' strike over rising fuel costs hit the company's competitors.
But analysts at XP Investimentos said increased spending by Petrobras on importing diesel fuel contributed to the company's earnings miss.
Petrobras said it received 1.6 billion reais from the government as part of the second phase of the subsidy program, which is set to end in December.
It was also hit by the payment of a $853.2 million fine to settle charges by U.S authorities that former executives and directors of the company broke U.S. anti-corruption laws.
That deal, coupled with the $2.95 billion settlement of a class action suit by U.S. investors, was a big in removing legal uncertainty from the so-called Car Wash investigation into a graft scheme that cost the state-run company billions of dollars.
Net debt at the world's most indebted listed oil company rose slightly to 291.834 billion reais ($78.30 billion) from 284.027 billion reais in the second quarter. It managed to lower its net debt to an EBITDA ratio to 2.96 from 3.23 in the second quarter, as it seeks to reach 2.5 by year-end.
Efforts to sell off $21 billion in assets in the 2017-2018 period have been hampered by legal hurdles and union resistance, but it could offload another $20 billion through 2019, a source told Reuters last month.
On Tuesday, executives acknowledged the goal would not be achieved, due to the halted sales of the TAG gas pipeline network and refineries. Chief Executive Officer Ivan Monteiro said he had not been approached by the team of far-right president-elect Jair Bolsonaro, who will take office in January and is expected to choose another leader for the company.
Petrobras said sales revenue grew to 98.26 billion reais, up from 71.822 billion in the same period last year.
Adjusted earnings before interest, taxes, depreciation and amortization (EBITDA) rose to 29.856 billion reais from 19.223 billion in the same period last year. ($1 = 3.7269 reais) (Additional reporting by Rodrigo Viga and Gram Slattery in Rio de Janeiro and Roberto Samora in Sao Paulo; editing by Jason Neely, Jane Merriman and Susan Thomas)