Expectations have been pretty low for oil and gas producers lately. But Devon Energy (DVN -2.18%) took those expectations and shredded them in its first-quarter 2017 earnings, which the company released after market close on Tuesday, May 2.

The market liked what it saw (and who wouldn't?), bidding the stock up more than 4% in after-hours trading. Here's what it liked so much and why.

Oil pumps at sunset.

Oil and gas driller Devon Energy had a stellar quarter. Image source: Getty Images.

The raw numbers

MetricQ1 2017Q1 2016Variance
Oil production (companywide) 563,000 BOE/day 685,000 BOE/day (18%)
Revenue $1.3 billion $825 million 59%
Net earnings (loss) $579 million ($3.5 billion) N/A
Earnings per share (diluted) $1.07 ($6.44) N/A

BOE = barrel of oil equivalent. Data source: Devon Energy. 

Right moves

Devon has been focusing on high-margin U.S. shale oil plays, particularly in the Eagle Ford shale in Texas and the STACK in Oklahoma. It paid off  this quarter as its strong oil production growth was driven entirely by the company's U.S. resource plays. Devon's total U.S. oil production reached 123,000 barrels per day in the first quarter, a 17% increase over fourth-quarter 2016, and those plays are the highest-margin plays in its entire portfolio. No wonder revenues were up 59%. The company will invest nearly 90% of its 2017 capital expenditures in its U.S. resource plays, which seems wise. 

And while companywide production was down 18% over the year-ago quarter, it was up 5% over last quarter, even as expenses have shrunk. The company cut its quarterly leasing expenses by $58 million year over year and its general and administrative expenses by $13 million year over year. 

Devon also announced it would divest $1 billion of non-core assets across its portfolio, mostly acreage in the Barnett shale region of Texas. It plans to use the proceeds to strengthen its higher-margin U.S. plays and improve its financial position.

What management had to say

Devon Energy President and CEO David Hager was very pleased with the quarter's performance:

Devon's development programs delivered strong growth in high-value production, significantly enhancing profitability in the first quarter. ... Importantly, we were able to deliver this outperformance with a low cost structure that is expected to further improve as we progress through the year. ... With excellent first-quarter results in hand, we are firmly on track to achieve our multi-year growth targets and deliver peer-leading cash flow expansion.

Investor takeaway

Unlike many of its peers, Devon Energy had a profitable, cash-flow-positive quarter that featured increased production, lower expenses, and higher margins. Given the current state of the energy industry, you couldn't ask for a better quarter from an exploration and production company. Now, if those pesky oil prices would only cooperate and rise.