(Adds CFO quote, details on crude exports, output and taxes)
MEXICO CITY, July 27 (Reuters) - Mexico's state run oil company, Pemex, on Thursday reported a 32.8 billion peso ($1.8 billion) second-quarter profit, helped by higher sales and lower financial costs.
It was the oil giant's third straight quarter in the black, and it previously reported three continuous profitable quarters in 2006.
Revenue at the company, officially Petroleos Mexicanos, jumped to nearly 322.5 billion pesos in the quarter, up 26 percent from 255.7 billion last year.
During the quarter, the average price for Mexico's crude export mix rose to $42.80 per barrel from $36.59 a year earlier.
"Our net accumulated positive result of 121 billion pesos during the first half of this year is a clear signal that we've improved; our finances are on the right path," said Juan Pablo Newman, the chief financial officer, on a call with analysts.
Crude exports were up 4.3 percent during the quarter to reach about 107,000 barrels per day (bpd).
Total crude production for the quarter, however, averaged 2.013 million bpd, down 7.5 percent compared to output during the same period last year.
Pemex hit peak crude output in 2004 with 3.4 million bpd.
Meanwhile, natural gas output fell about 12 percent during the quarter to average 4.336 billion cubic feet per day.
On the plus side, the company reported higher financial income and lower financial costs during the quarter.
Crude processing at the company's six domestic refineries stood at 905,000 bpd in the quarter, a level described as "relatively stable" despite being far bellow the plants' processing capacity.
Company officials reiterated that the Salina Cruz refinery, Pemex's biggest, will resume operations on July 30 following an explosion and flooding that forced it offline last month.
Prior to revising its fourth-quarter earnings report last year, which originally showed a loss, the company had suffered a five-year stretch of losses amid a dozen years of declining crude production and a global slump in oil prices since late 2014.
Pemex's total tax bill for the quarter stood at 100 billion pesos, up 47 percent compared to the 68 billion pesos in taxes the company paid in the previous April to June period.
Long a major source of tax revenue for the government, Pemex now contributes less than a fifth of federal revenue, down from more than a third a few years ago. ($1 = 18.143 Mexican pesos on June 30) (Additional reporting by Michael O'Boyle and Adriana Barrera; editing by Steve Orlofsky)