Oil prices rose on Thursday as the equities markets rallied and as market participants weighed a rise in U.S. crude inventories and production against continued OPEC supply curbs.
The oil price touched $71 a barrel on Tuesday, near its high for the year, but has struggled to gain further traction since then, despite supportive comments from the Organization of the Petroleum Exporting Countries.
U.S. West Texas Intermediate crude futures finished Thursday's session up 56 cents at $64.94 a barrel.
June Brent crude futures was up 57 cents at $69.33 a barrel by 2:27 p.m. ET, while the , which expires later on Thursday, was down 75 cents at $70.28.
Brent has risen by 5 percent since January, on track for its third consecutive quarter of price increases and the longest stretch of quarterly gains since late 2010. U.S. WTI crude is up about 7.5 percent since the start of the year.
"The equities market is rallying and that's lending support to oil," said Philip Streible, senior market strategist at RJO Futures in Chicago. All three major U.S. stock indexes were positive on Thursday.
"The dollar is slightly in positive territory, but it's not screaming like yesterday," which is also supportive to crude prices, said Streible. The dollar against a basket of currencies was up about 0.04 percent, after gaining 0.8 percent Wednesday. A weaker greenback makes dollar-denominated commodities cheaper for holders of other currencies.
Strong compliance on supply cuts from members of The Organization of the Petroleum Exporting Countries (OPEC) and allies like Russia have supported prices. OPEC sources said the group and its allies are likely to keep their deal on cutting output for the rest of 2018 when they meet in June.
U.S. energy companies this week cut oil rigs for the first time in three weeks.
Drillers cut six oil rigs in the week to March 29, bringing the total count down to 798, General Electric Co's Baker Hughes energy services firm said in its closely followed report on Thursday.
But rising inventories and production in the United States has capped gains in crude prices. Commercial U.S. stocks rose by 1.6 million barrels in the last week to 429.95 million barrels, while output hit a record 10.43 million bpd, the Energy Information Administration (EIA) said.
"Right now, oil looks fragile," Petromatrix strategist Olivier Jakob said. "The price action last week was pretty clear. The objective on that move was to take out the highs of 2018, but that's not been done and the price action of the last three days has not been very convincing."
This week marked the launch of the Shanghai crude oil futures contract, which has lost about 10 percent since it first opened on Monday. It ended Thursday's session at 409.7 yuan ($65.18) a barrel.
Despite high volatility and lingering skepticism about Shanghai's trading hours, along with doubts about the process for physical delivery of crude under contract, most analysts expect the contract to establish itself as a third global oil price benchmark next to Brent and WTI.
Goldman Sachs said in a note to clients that there was "finally, an exchange traded price for Chinese crude oil."
Shanghai's "start of trading was relatively successful (as)...it is the first onshore Chinese commodity contract that allows direct trading by foreign investors and is denominated in RMB (yuan), indirectly promoting the use of the Chinese currency," Goldman said.
— CNBC's Tom DiChristopher contributed to this report.