San Antonio-based Abraxas Petroleum Corp. swung to a $13.7 million profit for the first quarter as revenue surged, boosted by a comeback in the energy industry, the company said Tuesday.

The oil and gas producer’s revenue almost doubled to $18.8 million during the three months ended March 31, up from $9.6 million during the same period last year. The company’s profit of 9 cents a share compares with a loss of $40.9 million, or 39 cents a share, during the same quarter last year when it had fewer shares outstanding, the company said in its earnings release after the markets closed.

Abraxas is an oil and gas exploration firm with operations in the Eagle Ford Shale in South Texas, Permian Basin in West Texas, the Rockies and the Bakken formation in North Dakota.

Its financial results beat Wall Street estimates, which projected that the company would earn 2 cents per share, according to a survey of seven analysts polled by Bloomberg Intelligence.

Abraxas exited 2016 making just under 8,000 barrels of oil equivalent per day, a measure that includes oil and natural gas.

Its production dipped in the first quarter of this year to around 6,800 barrels daily — a result of a pullback in spending during an extended downturn in the oil industry, CEO Bob Watson said at the company’s annual meeting at its corporate headquarters Tuesday morning.

But Abraxas has three drilling rigs running now — one in each of the major shale oil fields, the Permian’s Delaware Basin in West Texas, where it is trying to acquire more acreage, the Eagle Ford and the Bakken. Watson said the company will continue adding new wells in each field, which will boost production in the second half of the year.

“Our third quarter is going to be a lot of fun,” Watson told shareholders.

Like the entire oil and gas industry, Abraxas has been emerging from a brutal oil price crash. Crude prices peaked at $107 per barrel in June 2014 and fell as low as $26 per barrel in January and February last year.