RIO DE JANEIRO, Oct 20 (Reuters) - Brazil's Petrobras posted mixed production figures on Wednesday as the state-run oil company ramps up output at some major oilfields while also jettisoning a number of legacy production assets as part of a wider divestment drive.

In a securities filing, Petroleo Brasileiro SA, as the state-run oil firm is formally known, said it produced 2.83 million barrels of oil equivalent per day in the third quarter, up 1.2% in quarterly terms, but down 4.1% from the same period last year.

Crude production came in at 2.269 million barrels per day (bpd), a 1.9% increase in quarterly terms and a 4% decrease from the third quarter of 2020.

Among the highlights of the quarter, the company said, was the entrance into operation of the Carioca, a type of massive offshore platform known as an FPSO, in the deepwater Sepia field. The firm also has begun commercially producing gas at its P-69 platform in the Tupi field, Petrobras said.

The company did not offer an explanation for the annual decrease in production. However, Petrobras production numbers have been hit by oilfield divestment in recent years, which have hurt output figures by taking production assets off the books.

Maintenance and COVID-19 related stoppages also commonly affect production at Petrobras.

In terms of domestic sales, the company registered strong growth for multiple refined products in both quarterly and annual terms, indicating that an upswing in consumption has continued apace. That is despite high prices which have driven some politicians to question Petrobras' market-based pricing policy.

The company sold 441 million bpd of gasoline domestically in the third quarter, up 14.3% in quarterly terms and 17.9% in annual terms.

Domestic diesel sales came in at 867 million bpd, up 6.4% from the previous quarter and 15.7% from the same quarter last year. (Reporting by Gram Slattery and Marta Nogueira Editing by Chris Reese, Diane Craft and Cynthia Osterman)