U.S. oil staged a brisk rally on Wednesday, ending just above $105 after a batch of U.S. data underscored strong demand in the world's largest consumer of oil.
Data showed that the U.S. gross domestic product unexpectedly accelerated in the second quarter to a 1.7 percent annual rate. Economists polled by Reuters had forecast the economy growing at a 1 percent pace. U.S. rivate-sector hiring was higher than forecast in July.
The positive economic data offset a government report that showed stockpiles of crude oil had risen against expectations for a draw.
The build should have been bearish for the crude oil market but prices remained supported by "the positive GDP number, which implies a certain degree of future demand," said Bob Yawger, director of futures at Mizuho Securities USA.
U.S. crude rose $1.95 to settle at $105.03, finishing the month about 9 percent higher -- its biggest rally in 11 months. Brent spent much of the day near break-even, but in late trading added about 80 cents to near $108 a barrel, on track for its biggest monthly gain since August 2012.
The front-month premium of Brent over U.S. crude oil was trading at $2.74 per barrel. The next month was also trading around the same at $2.73.
Crude held gains after the Federal Reserve, as expected, stuck to its bias for massive monetary stimulus. The Fed's policy is seen beneficial at the margins to oil prices, even amid weaker demand.
Brent crude oil prices were set to post their biggest monthly rise in close to a year, boosted by gains earlier in July as political tensions in the Middle East kept alive concerns about oil supplies out of that region, which pumps a third of the world's oil.
Oil outages in Iraq, South Sudan, Libya and Iran have combined to help keep Brent crude oil prices well above $100 a barrel this month, partly countering the rise in U.S. shale oil supply and worries about Chinese demand.
But on Wednesday the market viewed global oil supplies as less of a concern as Sudan said it may not be forced to block vital crude exports from South Sudan after recent "good steps" made to end a row over alleged rebel support.
Pumping of crude oil resumed through the Kirkuk-Ceyhan pipeline last night after repairs were completed following a bomb attack over the weekend. Investors were also awaiting manufacturing data later this week from China, which could highlight weakness in the world's No. 2 oil consumer.