U.S. oil closed at its highest level of the year on Wednesday after a lower than expected build of crude oil stocks in the United States.

U.S. crude oil futures closed up $3.10, or 5.8 percent, at $56.39 a barrel. That was the highest closing level since December 23, and its fourth best day for this year.

Meanwhile, front-month May Brent crude futures were up $1.60 at $60 per barrel ahead of their expiry later today.

Crude inventories rose by 1.29 million barrels to 483.69 million barrels in the week to April 10, the U.S. Energy Information Administration said on Wednesday, against a forecast of a 4.1 million barrel rise from a Reuters survey of analysts.

The spread between Brent and WTI front-month futures fell below $4.

“WTI crude oil has cleared short-term resistance with this week’s rally, and today it is testing the upper boundary of a basing phase defined by the February highs just above $56/bbl,” Katie Stockton, chief technical strategist for BTIG Research told CNBC.

“If those highs are cleared decisively (on a consecutive daily closing basis), then a base breakout would occur as a higher high is established.”

Crude oil prices rose earlier on Wednesday amid tension in the Middle East and signs of a dip in U.S production, but gains were initially capped by a report from the International Energy Agency indicating that supplies would take longer to tighten than previously expected.

Prices were supported by uncertainty in the Middle East, where fighting continues in Yemen. A Saudi-led campaign of air strikes against Iran-allied Houthi rebels threatened to turn into a ground intervention after Egypt said it had discussed military maneuvers with Saudi Arabia and other Gulf allies.

In the United States, North Dakota’s February oil production fell 15,000 barrels per day versus January, although the number of producing wells hit a record high.

That followed an Energy Information Administration report forecasting U.S. shale production would fall by 45,000 bpd to 4.98 million bpd in May, which would be the first monthly decline in four years.

But world oil markets may take longer to tighten than expected due to supply rising faster than demand, the IEA said on Wednesday. Production from the Organization of the Petroleum Exporting Countries surged to 31.02 million barrels per day in March, almost a two-year high, outweighing a rise in demand.

“Recent developments thus may call into question past expectations that supply and demand responses would tighten the market from mid-year on,” the IEA, which advises industrialized countries on energy policy, said in a monthly report.

However, while an oil supply shortage may be the last thing on investors’ minds, the ability of OPEC producers to cope with an unexpected surge in demand is diminishing fast, analysts and forecasters say.

Meanwhile, China saw its economic growth slow to 1.3 percent between January and March on a quarterly basis after seasonal adjustments, compared with growth of 1.5 percent in the previous three

March factory output rose 5.6 percent from a year earlier, below the 6.9 percent seen in a Reuters poll and its lowest level since the global financial crisis in 2008.