Production of crude and natural gas by Mexico’s state-owned Petroleos Mexicanos (Pemex) slipped in the second quarter, but at a slower rate, the company said Thursday.

In a filing with the Mexico Stock Exchange, Pemex indicated that financially, it is on something of a roll after three straight quarters in the black — an achievement unequaled since 11 years ago. At that time, Pemex was producing 60% more crude than it does now. And at the time, it was a strict state monopoly, which was ended by the 2013 energy reform.

Net profits in 2Q2017 totaled $1.8 billion, reversing a year-ago net loss of $4.7 billion.

The positive results were not necessarily fruits of the reform, however. Pemex CFO Juan Pablo Newman pointed out during a conference call with analysts on Thursday that the 2Q2017 outcome was boosted by more stable prices in world oil markets and an increase of the Mexican peso against the U.S. dollar.

Natural gas production during the quarter totaled 4.336 Bcf/d, nearly flat sequentially and 12% lower than year-ago output of 4.946 Bcf/d. About 24% of 2Q2017 output was non-associated gas, a proportion that has held readily steady in recent years.

The most recent results contrast with the dismal three years in which Emilio Lozoya was director-general of Pemex. Then, financial losses mounted, and little, if any, progress was made in forming alliances, joint ventures and farm-outs with the rest of the world’s oil industry, which were the promised fruits of the reform.

However, CEO Jose Antonio Gonzalez Anaya has introduced major farm-out agreements in the Gulf of Mexico’s deepwater and participation in winning consortiums for upstream auctions.

However, Pemex still operates only in Mexico.

Similar state-owned companies such as Norway’s Statoil ASA, Colombia’s Ecopetrol and Brazil’s Petroleo Brasilero SA, aka Petrobras, roam the world in search of business opportunities. Attempts to find partners to assist in resolving the crisis in Pemex refineries have made little response.

However, as Newman pointed out in the conference call, Mexico’s government is now much less dependent on income from Pemex. Until recently Pemex generated about one-third of government income. Now its role as a cash cow has been sharply diminished; it now provides about 20%of the federal budget.