U.S. energy companies added oil rigs for the first time in three weeks, Baker Hughes, a GE company (NYSE: BHGE), said in its weekly report.

Drillers added two oil rigs in the week to Aug. 31, bringing the total count to 862, according to the report.

The oil rig count rose by one in August after gaining three rigs in July and losing one in June.

U.S. crude futures were on track to post their second straight weekly gain on concerns about an expected fall in supply from Iran due to U.S. sanctions and Venezuela's declining output. For the month, prices were set to rise about 1.7%.

The U.S. rig count, an early indicator of future output, is much higher than a year ago when 759 rigs were active. Energy companies have been ramping up production in tandem with OPEC's efforts over the past year-and-a-half to cut global output.

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

Looking ahead, crude futures were trading at $70 for the balance of 2018 and $67 for calendar 2019.

In anticipation of higher prices in 2018 than 2017, U.S. financial services firm Cowen & Co. this week said the E&P companies they track have provided guidance indicating an 18% increase this year in planned capital spending.

Cowen said those E&Ps expect to spend a total of $85.3 billion in 2018, up from an estimated $72.2 billion in 2017.

Analysts at Simmons & Co., energy specialists at U.S. investment bank Piper Jaffray, this week forecast average total 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.

A total of 1,048 oil and gas rigs are currently in service.

So far this year, the total number of oil and gas rigs active in the United States has averaged 1,015. 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.

Texas oil production fell in June from a year earlier for the first time in 16 months, according to figures released Aug. 31 by the state’s energy regulator, a fresh sign that a lack of pipeline space in the nation's largest shale field may be curbing production.

U.S. crude oil production in 2018 is expected to rise 1.31 million barrels per day (MMbbl/d) to 10.68 MMbbl/d, lower than last month’s forecast of growth of 1.44 MMbbl/d to 10.79 million, the U.S. Energy Information Administration said earlier this month.