Oil was on track for the biggest weekly gain in more than a month as supplies tightened and amid signs of progress on the U.S.-China trade deal.

Futures erased earlier losses and were on course for a weekly increase of more than 5%. U.S. government data on Wednesday showed a surprise pullback in the nation’s crude stockpiles last week, and on Thursday a critical North Sea pipeline was briefly halted by a power loss. Yet weak economic data from Germany and South Korea fanned concerns that world fuel demand is flagging, and the U.S.-China trade clash continued to put a dampener on investor sentiment.

“We are a little optimistic that there will be a China-U.S. Trade deal,” Bart Melek, commodity strategist at Toronto Dominion Bank, said by phone.

Oil is down about 15% from an April peak as the trade spat between Washington and Beijing dents demand, though President Donald Trump has raised expectations that he and Chinese President Xi Jinping will sign a phase-one deal in Chile next month.

West Texas Intermediate for December delivery rose 21 cents to $56.42 a barrel on the New York Mercantile Exchange at 11:29 a.m. local time.

Brent for December settlement was climbed 10 cents at $61.77 a barrel on the London-based ICE Futures Europe Exchange. Prices are 3.7% higher this week. The global benchmark crude traded at a $5.33 premium to WTI.