For more than three years the oil market has been strangled by a persistent supply glut, but next year there’s the opposite issue to be concerned about: an outright supply shortage.

In a range of notes out on Wednesday, analysts at Allianz Global Investors, Jefferies and RBC Capital Markets all expressed optimism that recent efforts to balance the market are working, which could mean the world will be short of oil in 2018.

“An abundance of oil, thanks largely to U.S. shale, has pushed down oil prices and sector sentiment. But since that means less investment in new production sources, the bearish market may soon rebalance from fears of oversupply to concerns over shortages — which would push prices higher,” Neil Dwane, global strategist at Allianz, said in a note.

Oil prices have slumped more than 50% since their peaks in 2013-2014, with West Texas Intermediate crude US:CLZ7 trading around $52.12 a barrel and Brent UK:LCOZ7 at $58.11 on Wednesday.

FactSet

In response to the supply glut and weak prices, the Organization of the Petroleum Exporting Countries and a group of non-cartel producers led by Russia agreed to cut production until the end of March 2018. The move has helped reduce the supply glut, providing a floor under the oil prices that have rebounded firmly from their 2016 lows in the mid-$20s.

However, the production cuts and three-year period of sluggish prices have discouraged investments in the industry. That could make it difficult for the sector to keep up with rising energy demand as the world economy continues to accelerate, according to Dwane.

“Global demand remains resilient at 97 million barrels a day, but oil fields are being steadily depleted. Oil producers collectively need to add about 7-8 million barrels a day in new production to keep up with demand growth and production declines, but that is difficult to do with prices so low,” he said.

A boom in U.S. shale production was one of the key reasons prices came crashing down in the summer of 2014. The producers were significantly hurt by the initial price slump, but have since slashed their costs and started to pump oil at strong rates again.

At the Oil & Money conference in London last week, delegates were particularly upbeat on the outlook for U.S. production in coming years, with several industry players noting that a second peak in shale output is coming.

Read:Rebound for U.S. shale oil hasn’t peaked yet — why OPEC should be wary

However, the analysts in Wednesday’s oil notes had a more downbeat take on the outlook for U.S. shale next year. Dwane said the U.S. shale boom looks unsustainable and companies could find it increasingly challenging to stay in business.

RBC Capital Markets

At Jefferies, oil analysts led by Jason Gammel warned U.S. oil growth could disappoint next year and partly remove one of the factors that’s keeping a lid on prices.

“While the U.S. is out-punching on growth this year, [Jefferies’] bottoms up forecast suggests that the U.S. could under-deliver on oil growth in 2018,” they said in a report.

“We believe that the backwardation in the Brent futures strip supports our thesis that the market is currently undersupplied, and if the OPEC/non-OPEC cuts are extended through the end of 2018 then we estimate the oil market will remain in modest under-supply until 2019,” they added. Backwardation refers to a situation in which prices for oil for delivery in the near future are higher than those for later deliveries.

Jefferies expect WTI to rise to $55 a barrel by the end of 2018, while Brent is expected to climb to $58.

The team at RBC Capital Markets in a note titled “Escape from Purgatory” lifted its crude oil forecast for 2018 to $51 a barrel, from $50 previously, and increased its Brent outlook to $55 from $53.19. The analysts kept their long-term targets unchanged at $65 and $69 for crude and Brent, respectively.

However, unlike the analysts at Jefferies and Allianz, the RBC strategists don’t see U.S. production disappointing in the near future. In fact, they lifted their forecasts for total U.S. output growth — including non-shale — for 2018’s fourth quarter to 870,000 barrels a day from 850,000 previously and bumped up the 2019 forecast to 810,000 from 756,000.

“On the brighter side, we do not believe that WTI prices will be relegated to purgatory indefinitely. The same forces that brought us here—namely long-term oil price expectations—will likely rescue prices down the road,” RBC said.