U.S. energy firms added rigs drilling for oil for the second time this year during the week ended June 3, energy services company Baker Hughes Inc. said, after crude prices briefly tested a seven-month high over $50 a barrel over the past two weeks.

That was a key price level that analysts and producers had said would likely trigger a return to the well pad. Drillers added 9 oil rigs during the week, bringing the total rig count up to 325, compared with 642 a year ago, Baker Hughes said in its closely followed report.

The new rigs were scattered across many basins and states with the Permian in West Texas and New Mexico gaining five, while Alaska and Texas gained three each. Prior to this week, energy companies added only one rig so far this year, during the week of March 18. They had cut on average 10 oil rigs per week for a total of 220 so far this year. They cut on average 18 oil rigs per week for a total of 963 in 2015, the most since at least 1988 amid the biggest rout in crude prices in a generation.

The rig count has dropped since hitting a peak of 1,609 in October 2014 as U.S. crude futures fell from over $107 a barrel in mid-2014 to a near 13-year low around $26 in February. Since then, U.S. oil futures have jumped by about 90%, breaking through the $50 mark earlier last week.

Oil prices, however, were headed for a near 2% loss this week due in part to the rig count increase and on earlier signs the market was moving back to more balanced supply and demand after a series of supply disruptions, ending three consecutive weeks of price gains.

Looking ahead, crude futures were fetching nearly $50 for the balance of 2016 and over $51 for calendar 2017 . U.S. oil executives and analysts have said any price rise above $50 could fuel a resurgence in new drilling projects.

Analysts at U.S. financial services firm Raymond James said they believe the U.S. total natural gas and oil rig count is at or near the bottom and a modest recovery is in store for the back half of 2016. This week's increase in total gas and oil rigs to 408 was the first gain since August, according to Baker Hughes.