BISMARCK, N.D., Aug. 29 (UPI) — As oil prices steady, state data show the number of rigs actively exploring for or producing oil and gas in North Dakota declined for the fourth straight week.

At 30 for Monday, the number of rigs listed as active in North Dakota is down about 12 percent from early August. Rig counts serve as a loose metric for investor confidence in the energy sector and a reflection of the appetite for spending from oil and gas companies.

After eight straight weeks of gains, the total U.S. rig count held steady despite massive volatility in the price for crude oil in August, according to Baker Hughes. Despite widespread swings, oil prices have moved more or less in the upper $40 range.

Though recovering, crude oil prices are still about 50 percent less than two years ago. Federal data show the economy in North Dakota, the No. 2 oil producer in the United States, moved from slight growth in the fourth quarter to a sharp contraction in the first quarter as the price for crude oil dropped to historic lows.

North Dakota Gov. Jack Dalrymple said that, without some form of correction, the state’s general fund will be short by about $310 million by the end of the next two-year cycle. The depressed market for crude oil and other commodities has stifled state revenue collections, he said.

Oil production in June, meanwhile, declined 2 percent from the previous month to around 1.03 million barrels per day and more than 15 percent lower than the all-time high reached in December 2014.

The decline in energy sector activity is spilling over into the state economy. Dalrymple has called on state leaders to find ways to cut costs given the lower cycle for the oil market.

North Dakota depends primarily on rail deliveries to get oil out of the Bakken shale reserve area to regional markets. That capacity is “adequate,” according to state regulators, though the state is working to expand pipeline access to the rest of North America.

A planned pipeline called Dakota Access would transport about half of the oil that North Dakota produces per day, or around 570,000 barrels per day, at its peak. Environmental and tribal groups are protesting the pipeline, saying it poses an “existential threat” to Native Americans.