The U.S. oil drilling rig count rose this week for the first time in four weeks, boosting the number of rigs in the nation’s biggest oil field to the most in nearly four years.

Drillers added eight oil rigs in the week to Oct. 12, bringing the total count to 869, Baker Hughes, a GE company (NYSE: BHGE), said in its weekly report. The increase was the biggest weekly gain since mid-August.

The U.S. rig count, an early indicator of future output, is higher than a year ago when 743 rigs were active because energy companies have ramped up production to capture prices that are higher in 2018 than 2017.

More than half the total U.S. oil rigs are in the Permian Basin, the country’s biggest shale oil formation. Active units there increased by four this week to 489, the most since January 2015.

Analysts said drillers could be adding rigs in anticipation of increased takeaway capacity ahead of the expected Nov. 1 startup of Plains All American Pipeline LP's Sunrise pipeline, which will add a total of 500,000 barrels per day (bbl/d) from Midland to Wichita Falls in Texas.

“Producers are looking to fill the new capacity on Sunrise rather quickly,” said Andrew Lipow, president of Lipow Oil Associates in Houston.

Before this week, the total number of rigs had stalled at around 860 since June as the West Texas drillers that drove the shale revolution in the Permian basin have overwhelmed the region’s ability to transport more oil out of the region via pipeline.

On Oct. 12, U.S. crude futures were trading around $71 per barrel, putting the contract on track to fall for the first week in five due to a big rise in U.S. inventories and fading concerns about looming U.S. sanction s aimed at cutting Iran's oil exports.

So far this year, U.S. oil futures have averaged $67.14 per barrel. That compares with averages of $50.85 in calendar 2017 and $43.47 in 2016.

Looking ahead, crude futures were trading near $71 per barrel for the balance of 2018 and just above $70 for calendar 2019.

U.S. financial services firm Cowen & Co. this week said the E&P companies it tracks have provided guidance indicating an 18% increase this year in planned capital spending.

Cowen said the E&Ps it tracks expect to spend a total of $85.3 billion in 2018. That compares with projected spending of $72.2 billion in 2017.

Analysts at Simmons & Co., energy specialists at U.S. investment bank Piper Jaffray, this week forecast the average combined oil and natural gas rig count would rise from 876 in 2017 to 1,031 in 2018, 1,092 in 2019 and 1,227 in 2020.

Since 1,063 oil and gas rigs were already in service, the most since March 2015, drillers would only have to add a handful of rigs during the rest of the year to hit Simmons’ forecast for 2018.

Year-to-date, the total number of oil and gas rigs active in the United States has averaged 1,021. That keeps the total count for 2018 on track to be the highest since 2014, which averaged 1,862 rigs. Most rigs produce both oil and gas.

The U.S. Energy Information Administration (EIA) this week projected average annual U.S. production will rise to a record high 10.7 MMbbl/d in 2018 and 11.8 MMbbl/d in 2019 from 9.4 MMbbl/d in 2017.

The current all-time U.S. annual output peak was in 1970 at 9.6 MMbbl/d, according to federal energy data.