U.S. energy companies this week added the most oil rigs in nearly four years, extending an eight-month recovery as drillers take advantage of a deal by OPEC to cut supplies that has boosted prices over $50 a barrel since early December.

Drillers added 29 oil rigs in the week to Jan. 20, bringing the total count up to 551, the most since November 2015, energy services firm Baker Hughes Inc. (NYSE: BHI) said on Jan. 20. During the same week a year ago, there were 510 active oil rigs.

Since crude prices first topped $50 a barrel in May after recovering from 13-year lows in February, drillers have added a total of 235 oil rigs in 30 of the past 34 weeks, the biggest recovery in rigs since a global oil glut crushed the market over two years starting in mid-2014.

The Baker Hughes oil rig count plunged from a record 1,609 in October 2014 to a six-year low of 316 in May as U.S. crude collapsed from over $107 a barrel in June 2014 to near $26 in February 2016.

U.S. crude futures were trading above $52 a barrel on Jan. 20 as growing U.S. production offset some of the cuts planned by OPEC and other producers.

U.S. shale production is set to snap a three-month decline in February, the U.S. government said on Tuesday, as energy firms boost drilling activity.

Analysts said they expect U.S. energy firms to boost spending on drilling and pump more oil and natural gas from shale fields in coming years now that energy prices are projected to keep climbing.

Futures for the balance of 2017 were trading around $55 a barrel, while calendar 2018 was fetching almost $56.

Analysts at Simmons & Co, energy specialists at U.S. investment bank Piper Jaffray, this week forecast the total oil and gas rig count would average 754 in 2017, 868 in 2018 and 979 in 2019. Most wells produce both oil and gas.

That compares with an average of 509 in 2016 and 978 in 2015, according to Baker Hughes data.

Analysts at U.S. financial services firm Cowen & Co said in a note this week that its capex tracking showed 27 E&P companies planned to increase spending by an average of 34% in 2017 over 2016. That spending increase in 2017 followed an estimated 47% decline in 2016 and a 35% decline in 2015, Cowen said, according to the 65 E&P companies it tracks.

U.S. oil production was rebounding, led by light tight oil, also commonly known as shale oil, as exploration drilling increased and wells became more efficient, the International Energy Agency (IEA) said on Jan. 19. On average, the IEA said in its monthly report, it expected U.S. light tight production to grow by closer to 170,000 barrels per day (bbl/d) in 2017, after falling by nearly 300,000 bbl/d in 2016.

The head of the IEA, Fatih Birol, said in Davos, Switzerland, on Jan. 19 that he expected U.S. shale oil output to rebound by as much as 500,000 bbl/d over the course of 2017, which would be a new record.