North Dakota’s petroleum production fell slightly in June — after hitting a new high in May — due to bad weather combined with ongoing structural issues in the state’s oil and gas industry.

North Dakota, the second-largest U.S. oil producing state, pumped out 1.23 million barrels per day in June, down 1.6 percent from 1.25 million barrels the previous month. In May, the state topped its previous output record set in December 2014 as overall U.S. oil production has climbed over the past year.

Natural gas production in North Dakota hit an all-time high in May, too, though it fell back by 1 percent in June.

Producers “tapped their brakes a little” in June, Lynn Helms, director of North Dakota’s Department of Mineral Resources, said in a conference call with reporters Thursday.

Rainy weather, particularly on a few days in June, shut down roads and stifled production in the state’s oil patch, he said. Also, North Dakota continues to produce more gas than it can process, limiting overall oil and gas production. When gas can’t be processed, it’s flared, and producers are running up against state-imposed flaring limits.

More gas processing plants are expected to come online this fall, which the state hopes will alleviate the problem.

Tight U.S. labor markets are squeezing the state’s oil fields, too, Helms said. North Dakota is competing for workers with the booming shale oil industry in Texas, New Mexico and Oklahoma.

“Competition with the Permian and Anadarko shale oil plays for capital and workforce continue to limit drilling,” Helms wrote in a monthly report released Thursday.

The number of active drilling rigs in North Dakota today stands at 58 compared to 66 in July, the largest one-month drop in at least a year. The rig count was 63 in June.

Oil prices hit 3 ½-year highs in late June and early July, with West Texas Intermediate crossing $74 per barrel.

Worries about a tariff-induced global economic slowdown have combined with a buildup in U.S. crude oil inventories to depress prices this month.