Onshore explorer Devon Energy Corp. crushed it — in a good way — during the second quarter, beating Wall Street earnings expectations and making significant progress to reduce costs, despite low commodity prices. Production was above guidance for the fourth straight quarter.

However, the Oklahoma City producer wasn’t immune to the low commodity price environment, with a $4.2 billion impairment on its assets. The impairment resulted in a loss of $2.8 billion (minus $6.94/share) in 2Q2015, versus year-ago profits of $675 million ($1.64). Operating cash flow plunged by half to $1.1 billion.

Core earnings were $320 million (78 cents/share) in the quarter, versus a consensus estimate of 36 cents, and well ahead of 1Q2015 profits of $89 million (22 cents). Revenue totaled $1.6 billion, an 18% sequential increase. Midstream operating profit, driven by EnLink Midstream growth, reached $225 million, above guidance and 16% higher than in 1Q2015.

“Devon delivered another high-quality performance in the second quarter as we continued to realize significant operational improvements across our portfolio,” said newly installed CEO Dave Hager, who took the helm July 1 from John Richels, who has become vice chairman.

“With current industry conditions, we are focused on maintaining flexibility in our capital programs,” Hager said. “To ensure this optionality, we have minimal exposure to long-term service contracts, no long-term project commitments and negligible leasehold expiration issues. This allows us to dynamically allocate capital to our highest-returning areas while balancing investment with cash flow. We believe this advantage, combined with our high-quality asset base and strong balance sheet, positions Devon as well as anyone in the exploration and production space.”

Production averaged 647,000 boe/d, 9% higher year/year, fueled by a 32% surge in oil output to 270,000 b/d — 5,000 b/d higher than Devon had projected and the fourth straight period in which output exceeded guidance. Liquids accounted for 60% of the production mix.

The biggest drivers were the Eagle Ford Shale, where output climbed 75% higher than a year ago. Permian Basin output from the Delaware subbasin rose 40%. Oilsands production from Canada also jumped 27%. As output increased, Devon achieved a 8% decline in operations costs, which fell to $11.05/boe year/year.