Brent futures rose 4 cents, or 0.1%, to settle at $63.20 a barrel, while U.S. West Texas Intermediate (WTI) crude ended 17 cents, or 0.3%, lower at $59.60.

"Crude prices are struggling for direction as short-term COVID pressures are countered by a much weaker U.S. dollar," said Edward Moya, senior market analyst at OANDA in New York.

The U.S. dollar fell to a two-week low against a basket of currencies, tracking Treasury yields lower, after data showed a surprise rise in U.S. weekly jobless claims.

A weaker dollar makes oil cheaper for holders of other currencies, which usually helps boost crude prices.

The S&P 500, meanwhile, hit a record high and the Nasdaq was at a seven-week peak, helped by gains in tech-related stocks, a day after the Federal Reserve reiterated its pledge to remain ultra-dovish until the economic recovery is more secure.

U.S. gasoline inventories rose sharply by 4 million barrels to a little more than 230 million barrels as refiners ramped up output before the summer driving season, the U.S. Department of Energy said on Wednesday. [EIA/S]

"A huge build in road fuel stocks is not what the market was expecting and concerns over the speed of the oil demand recovery resurfaced, leaving traders wondering how stable road fuel usage actually is," said Rystad Energy analyst Bjornar Tonhaugen.

Russia said the fallout from the COVID-19 pandemic on the global consumption of oil may last until 2023-2024, according to a draft government document seen by Reuters.

While oil demand remains weakened by the impact of the coronavirus, crude production looks set to rise.

Last week, the Organization of the Producing Countries (OPEC) and its allies, including Russia, a group known as OPEC+, agreed to bring back about 2 million barrels per day (bpd) of production over the next three months.

Iran and the United States held talks with other powers on reviving a nuclear deal that almost stopped Iranian oil from coming to market, reviving tentative hopes Tehran might see some sanctions lifted and add to global supplies.

Data intelligence firm Kpler said the U.S.-Iran negotiations provide potential for 2 million bpd in additional oil supply if a deal is struck.

Russian oil output increased from average March levels in the first few days of April, traders said.

In the United States, energy research firm East Daley lifted its rig and production outlook for the Permian Basin in Texas and New Mexico following a 22% rally in WTI prices during the first quarter. The firm said that price rise set the stage for years of additional oil and natural gas output from the shale formation.

(Additional reporting by Shadia Nasralla in London and Aaron Sheldrick in Tokyo; Editing by Marguerita Choy and Susan Fenton)

By Scott DiSavino