U.S. energy firms added oil rigs for a fourth straight week, according to data that highlights how a period of stable prices earlier this summer lulled some drillers into stepping up spending just before a second oil market slump.

Reflecting plans announced in May and June, when U.S. crude futures averaged $60 a barrel, drillers added two oil rigs in the week ended Aug. 14, bringing the total count up to 672, the highest since early May, oil services company Baker Hughes Inc. said in its closely followed report.

They may now regret those moves as U.S. crude has tumbled nearly $20 a barrel to reach a new 6-1/2-year low under $42, prompting a new round of spending and job cuts across the beleaguered global oil industry.

Many forecasters including Australian bank Macquarie expect the rig count to resume drifting lower through the second half of the year as weaker prices bite.

While the number of rigs is still 58% lower than it was at its peak last October, the slight rebound over the past month suggests U.S. oil production may be slightly higher than earlier expected, although the effect will take time to see. It can take up to six months for a new well to begin pumping crude.

Drillers added oil rigs in two of the four major U.S. shale oil basins, with five in the Eagle Ford in South Texas and one in the Niobrara in Colorado and Wyoming. They removed two rigs in the Bakken in North Dakota and Montana, while the number of rigs in the Permian in West Texas and eastern New Mexico held steady.

U.S. crude oil prices were on track for a seventh straight weekly loss, the longest losing streak since January, on continued oversupply worries from mostly U.S. and OPEC producers and slumping demand from China and much of the rest of the world.

The last time oil prices collapsed, from around $107 a barrel in June 2014 to under $44 in January, energy firms slashed spending, cut thousands of jobs and idled around 60 percent of the record high 1,609 oil rigs that were active in October.

Production has started to show signs of decline. U.S. crude output dipped to 9.4 million barrels per day (MMbbl/d) last week from 9.5 MMbbl/d in the prior week, according to government data. That is down from average production from mid-May to late June of 9.6 MMbbl/d, the most since the early 1970s.