Oil prices ended steady Friday after hitting 2016 highs, but finished April trading about 20 percent higher, with Brent crude having its best monthly gain in seven years.

A weaker U.S. dollar amid optimism that a global oil glut will ease have lifted crude futures by more than $20 a barrel since they plumbed 12-year lows under $30 in the first quarter.

Brent futures settled just a penny lower at $48.13 a barrel, after reaching a 2016 peak at $48.50. The global benchmark rose 21.5 percent in April, its largest monthly advance since May 2009.

U.S. crude futures closed 11 cents lower at $45.92 a barrel, after hitting a year-to-date high at $46.78. The U.S. benchmark gained 20 percent in April, its biggest monthly gain in a year.

With prices less than $5 away from $50 a barrel, investment bank Jefferies said the market “is coming into better balance” and would flip into undersupply in the second half of the year.

But others warned the rally was driven by investors holding large speculative positions, while oil stockpiles were still high, with a Reuters survey showing OPEC output in April rising to its highest level in recent history.

“The issue is that we haven’t seen price rallies ... correlate with fundamentals,” said Hamza Khan, senior commodity strategist at ING. “The fundamentals — high stocks, high production — haven’t changed.”

Technical analysts said crude could cruise to $50 a barrel but stiffer resistance before $55 could spark profit-taking on the market’s biggest rebound in two years.

Analysts polled by Reuters raised their average forecast for Brent in 2016 to $42.30 per barrel, the second consecutive month of increases.

Bank of America Merrill Lynch said in a note that “non-OPEC oil supply is indeed hanging off a cliff” and estimated that global output would contract year-on-year in April or May for the first time since 2013.

The OPEC survey aside, Saudi oil output was expected to edge up by 350,000 barrels per day to around 10.5 million bpd, sources told Reuters, as tankers filled with unsold oil floated at sea seeking buyers.

Meanwhile, the discount in spot U.S. crude to the next trading month whittled to its smallest size since January, reducing the advantages of storing oil in the U.S. for later delivery.