Oil prices rose on Wednesday as strong global refining margins and the reopening of U.S. Gulf Coast refineries provided a more bullish outlook after sharp drops due to Storm Harvey.
U.S. West Texas Intermediate (WTI) crude futures finished Wednesday's session up 1 percent at $49.16, the highest closing level in four weeks.
Brent had gained 72 cents, or 1.4 percent, to $54.10 a barrel by 2:24 p.m. ET (1824 GMT), having struck a more than three-month high going back to May 25 earlier in the session.
"Prices are extending the momentum seen in the last few days due to a number of U.S. refineries restarting after Harvey," said Harry Tchilinguirian, head of commodity markets strategy at BNP Paribas.
"There were concerns over a big drop in crude demand but with refinery restarts or announcements of them ... we see that their infrastructure has been mostly preserved," he said.
Many refineries, pipelines and ports that were knocked out by Harvey 10 days ago are restarting.
As of Tuesday, about 3.8 million barrels per day (bpd) of refining capacity, or 20 percent of the U.S. total, was shut. This compares with 4.2 million bpd at the height of the storm.
Focus was also being drawn to the Category 5 storm Hurricane Irma, which is barreling towards the Caribbean and Florida and could knock out other refineries and cause more fuel shortages.
Around 250,000 barrels of daily refining capacity in the Dominican Republic and Cuba lies in the immediate path of Irma, Thomson Reuters Eikon data showed.
Fuel storage data due on Wednesday from the American Petroleum Institute and on Thursday from the Energy Information Administration is expected to give a better view of the extent of Harvey's impact on U.S. fuel inventories, although analysts say it will take a few weeks longer to get a complete picture.
There is also another tropical storm on Irma's heels in the Atlantic, and another one active in the Gulf of Mexico.
Longer-term, the oil industry outlook is for ample supplies and low prices as crude output remains high in the three biggest producing regions: Russia, the Middle East and North America.
Adding to the longer term bearishness, some Libyan production returned. The 280,000 bpd Sharara oilfield, the country's largest, was gradually restarting on Wednesday after the lifting of a pipeline blockade, Libyan oil sources said.
Russian Energy Minister Alexander Novak said on Wednesday he expected the 2018 Brent price be $45 to $55 a barrel.
Kuwaiti oil minister Essam al-Marzouq forecast Brent would hover between $50 and $55 until the end of 2017.
— CNBC's Tom DiChristopher contributed to this report.