North Dakota’s oil fields posted another grim month in April with production dropping by 70,000 barrels per day, the largest month-to-month decline in the state’s history.

The oil drilling rig count fell from 29 in April to 27 in May, the lowest since July 2005. With oil prices hovering around $50 per barrel in recent weeks, the rig count has increased by one — a rare bit of good news from North Dakota’s monthly production report released Wednesday.

North Dakota’s Bakken oil fields have been battered by the steep drop in oil prices over the past year.

“We are at a record level of inactive wells,” Lynn Helms, director of the North Dakota Department of Mineral Resources said in a conference call. In Williams County in western North Dakota, which includes the oil hub of Williston, no drilling rigs are active. “We haven’t seen that since October of 2008,” Helms said.

North Dakota, the nation’s second largest oil producing state, pumped out 1.04 million barrels per day in April, down from 1.11 million in March. The state’s peak production was 1.23 million barrels per day in December 2014.

“We were expecting a large production drop and it arrived,” Helms said, noting that with low drilling levels, average daily production in a month could fall below 1 million barrels before the end of the year.

The key will be oil prices, which have rallied with kinks in global production and relatively strong demand for petroleum products. The benchmark price of West Texas Intermediate crude has risen from below $35 per barrel in the winter to just over $50 during past week or so. It’s now about $48 per barrel.

The months of June, July and August are typically the strongest production months in North Dakota, Helms said. “I think we can stabilize production,” he said, at least for the summer.

One positive development for North Dakota’s oil business: The wasteful flaring of natural gas is down sharply this year. The U.S. Energy Information Administration reported earlier this week that in March, 10 percent of North Dakota’s natural gas production was flared, down from 36 percent in January 2014.

Flaring is the burning of natural gas at wells that are not connected to pipelines, North Dakota has tightened flaring regulations and strengthened efforts to utilize the stuff.

“We are really making progress capturing and marketing natural gas in North Dakota even in the face of lower prices,” Helms said in Wednesday’s conference call.