Oil closed at a four-week high as refiners revved up plants pounded by Hurricane Harvey, sparking demand for crude.

Futures rose one per cent in New York while gasoline declined for a third session. Motiva Enterprises LLC’s refinery 90 miles east of Houston, which processes more crude than any other North American plant, was on track to reach 40 per cent of its normal working rate within days. Tankers that had been stranded offshore began delivering crude to refiners that had been in danger of running dry last week. Meanwhile, Hurricane Irma swept over the Caribbean, affecting energy infrastructure in its path.

The restart of Gulf refineries “implies that we are not going to get these great accumulations of inventory in oil as some had thought,” Bart Melek, head of global commodity strategy at TD Securities in Toronto, said by telephone.

Harvey knocked out more than 20 per cent of the nation’s refining capacity in just 48 hours, according to Sandy Fielden, Morningstar Inc.’s director of oil and products research. The storm also shut pipelines, ports and offshore platforms as it intensified before making landfall on Aug. 25. Although many of those facilities are back in service, the recovery is incomplete due to extensive flooding in some areas that will probably require costly, time-consuming repairs.

“The refineries are coming back online,” Craig Bethune, a senior portfolio manager who focuses on natural resources investments at Manulife Asset Management Ltd. in Toronto, said by telephone. But “the market still views pricing as range-bound.”

Pioneer Natural Resources Co. Chief Executive Officer Tim Dove expects oil prices to remain range-bound through 2018, according to remarks he made at a New York energy conference on Wednesday.

West Texas Intermediate crude for October delivery climbed 50 cents to settle at US$49.16 a barrel on the New York Mercantile Exchange. WTI is approaching its 200-day moving average at about US$49.50 a barrel.

Brent for November settlement added 82 cents to end the session at US$54.20 a barrel on the London-based ICE Futures Europe exchange, the highest level since April. The global benchmark traded at a premium of US$4.58 to the November WTI contract.

October gasoline futures in New York dropped 1.5 per cent to settle at $1.6733 a gallon.

Hurricane Irma

Hurricane Irma was headed toward Puerto Rico on a path that may lead to a potential landfall in Florida this weekend. Models showed it veering away from oil platforms in the central and western Gulf of Mexico. Yet, it still is already having an impact on other energy assets.

NuStar Energy LP shut its St. Eustatius oil terminal on Monday in the Caribbean and BP Plc is evacuating non-essential personnel from its Thunder Horse platform 150 miles southeast of New Orleans. Meanwhile, Buckeye Partners LP initiated its full-plant shutdown procedures at its facility in Puerto Rico, suspending all marine terminal operations.

“If it goes through Florida, that’s definitely a headwind for demand” for gasoline and other fuels, Bethune said.

U.S. crude stockpiles likely rose by 4 million barrels last week, while gasoline inventories shrank by 5.2 million barrels for the biggest decline since March, according to a Bloomberg survey before government data to be released on Thursday, a day later than usual because the Labor Day holiday was on Monday. The industry-funded American Petroleum Institute will release its inventory data on Wednesday.