Gasoline stocks rose by 1.2 million barrels, compared with analysts' expectations for a 488,000-barrel drop. The West Texas Intermediate futures for September delivery was up by 1.2% to $67.22 per barrel.
USA crude rose more than 4 percent on the week, after seven consecutive declines, and Brent rose 5.3 percent after three weeks of falling prices.
Brent crude oil futures were at $74.65 per barrel, down 13 cents from their last close.
S&P flat after Fed minutes as index marks record bull run
People walk by a Wall Street sign close to the New York Stock Exchange (NYSE) in New York, U.S., April 2, 2018. The index only crossed the threshold on an intraday basis on Tuesday, when it briefly hit 2,873.23.
U.S. oil edged up on Thursday to extend gains from the previous session, lifted by a decline in USA commercial crude inventories, while worldwide crude markets were weaker due to the trade dispute between the United States and China.
Oil prices slipped on Thursday as an escalating trade dispute between the United States and China outweighed the bullish impact of a decline in USA commercial crude inventories.
At the same time, concerns about global crude supply intensified with signs that USA sanctions on Iran are curbing shipments.
The trade dispute between the United States and China deepened on Thursday with the imposition of 25% tariffs on US$16 billion worth of each other's goods. Washington is holding hearings this week on a proposed list of an additional $200 billion worth of Chinese imports to face duties.
S.Africa Lashes Trump Over Land 'seizures' Tweet
The stark disparity stems from purchases and seizures during the colonial era that were then enshrined in law during apartheid . The Anti-Defamation League issued a statement criticizing Trump's missive, saying that it echoed white supremacists.
These (overall) measures are expected to shave up to 0.3-0.5 percentage points from China's real GDP growth in 2019, said rating agency Moody's Investor Service.
"With countries including China and India unwilling to completely cut Iranian oil imports, and with the European Union also refusing to endorse the withdrawal from Iran nuclear deal, the U.S. finds itself in a compromising position to negotiate with Iran's customers to reduce oil imports", the statement added.
American crude oil stockpiles are predicted to go down by 2 million barrels ahead of the Energy Information Administration's weekly report that is due to be published on Wednesday.
Chinese ship owners are no longer accepting Iranian oil and its using its own tankers to supply oil to top USA customers as the impending American sanctions are expected to disrupt worldwide trade.
Trump says impeachment would cause economic dive
US President Donald Trump has responded to speculation that he might be impeached by warning that any such move would damage the economy.
Iran is the third-biggest producer within the Organization of the Petroleum Exporting Countries (OPEC), exporting on average around 2.5 million barrels per day (bpd) of crude and condensate this year, equivalent to around 2.5 percent of global consumption.