U.S. energy firms added oil rigs for the first time in the past three weeks despite sharp declines in crude futures prices to their lowest since the summer of 2017.

Drillers added 10 oil rigs in the week to Dec. 21, bringing the total count to 883, Baker Hughes Inc. (NYSE: BHGE), General Electric Co.'s (NYSE: GE) energy services firm, said in its closely followed report on Dec. 21. This was the biggest weekly gain in rig numbers since early November.

More than half the total U.S. oil rigs are in the Permian Basin, the country's biggest shale oil formation. Active units there held steady this week at 486, the lowest since early October.

Drillers added two rigs in the Niobrara Shale in Colorado and Wyoming, bringing the total there up to 30, the most since Sept. 2017, and three rigs in the Williston Basin in North Dakota and Montana, bringing the total up to 56.

The U.S. rig count, an early indicator of future output, is higher than a year ago when 747 rigs were active as energy companies have spent more to capture higher prices.

U.S. crude futures were trading around $46 a barrel on Dec. 21, down about 10% for the week, as global oversupply kept buyers away from the market ahead of the end of year holidays. Earlier Dec. 21, the contract fell to its lowest since July 2017.

Crude futures were trading around $49 a barrel for calendar 2019 and $50 for calendar 2020.

U.S. financial services firm Cowen & Co. this week said the exploration and production companies it tracks have provided guidance indicating a 23% increase this year in planned capital spending.

Cowen said the E&Ps it tracks expect to spend a total of $88.9 billion in 2018. That compares with projected spending of $72.2 billion in 2017. Cowen said early 2019 capital spending budgets were mixed.

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.

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