North Dakota, the largest oil-producing U.S. state after Texas, expects output to surge this summer as good weather allows workers more time to pump from the fields, and it appears that oil moving by rail in the state has peaked as oil moving by pipeline increases.

Output climbed the most in May since last August, by 3.6 percent to 1.04 million barrels a day, the state’s Department of Mineral Resources said this week. Lynn Helms, director of the department, told reporters on a conference call that she expects production growth to hit 5 to 6 percent a month in June, July and August.

Since May 2011, the boom in oil production from North Dakota and Texas has increased the amount of oil riding trains nationwide by more than 400 percent, causing some fiery and sometimes fatal derailments and sparking a national debate about rail safety. But since the beginning of the year, oil-by-rail shipments have been declining, while oil exports by pipeline have increased.

About 34 percent of North Dakota’s oil was shipped by pipeline and 59 percent by rail in May, according to the North Dakota Pipeline Authority. That’s the lowest rail percentage since November 2012. In April, 63 percent of the oil produced in North Dakota was shipped by rail, down from a peak of 75 percent in April 2013, according to the NDPA.

“We did have open space available on some of our pipeline systems that were able to allow for the barrels [of oil] to then have that option to be moved onto the rail network,” said Justin Kringstad, director of the agency.

The state has several pipeline projects lined up that will dramatically expand capacity, including two before the end of the year, the Butte Loop and Hiland Double H, with a combined capacity of 160,000 barrels of oil per day. In May, the Plains Bakken North pipeline came online and took 40,000 barrels per day to Canada.

Kringstad expects that as pipeline capacity expands, more oil will move through pipes, since it's usually a cheaper method than rail. But he’s quick to clarify that the NDPA can’t predict.

“We don’t know what production levels are going to be,” he said.