Oil prices were mixed on Thursday, as concerns about a potential global recession that would knock energy demand offset lower crude inventories and a rebound in U.S. gasoline consumption.

Brent crude futures ended the day 52 cents higher at $107.14, after gaining $2.22 on Wednesday.

U.S. West Texas Intermediate crude (WTI) settled 84 cents, or 0.9%, lower at $96.42 a barrel, after rising $2.28 in the previous session.

Prices pared gains mid-morning trade after the U.S. Commerce Department reported the world’s biggest economy unexpectedly contracted in the second quarter, fuelling concerns about a recession that could hit energy demand. Consumer spending grew at its slowest pace in two years and business spending declined.

“When we look at recessionary numbers, if it is a slowdown at this point, it’s a minor slowdown,” said Phil Flynn, an analyst at Price Futures group. “If you look at demand and supply numbers for oil, we’re well below average on supply and demand is holding up better than anticipated.”

Investors focused on U.S. crude inventory numbers from Wednesday that showed oil stockpiles fell by 4.5 million barrels last week, against expectations for a 1 million-barrel drop, while U.S. gasoline demand rebounded by 8.5% week on week, data from the Energy Information Administration (EIA) showed.

“The U.S. consolidated its position as the world’s largest petroleum exporter,” Citi analysts said in a note, as combined gross exports of crude oil and refined products stood at a record 10.9 million barrels per day.

U.S. crude exports reached a record 4.5 million bpd as WTI traded at a steep discount to Brent. However, in a bullish signal, U.S. crude oil production growth could stall due to a lack of fracking equipment and crews, as well as capital constraints, executives said this week.

Prices found further support from the energy supply battle between the West and Russia. The Group of Seven richest economies aims to have a price-capping mechanism on Russian oil exports in place by Dec. 5, a senior G7 official said on Wednesday.

Meanwhile, Russia has cut gas supplies via Nord Stream 1, its main gas link to Europe, to just 20% of capacity. That could lead to switching to crude from gas and prop up oil prices in the short term, analysts said.

“We increase our total estimates for additional oil demand from gas to oil switching by 700,000 bpd from October 2022 through March 2023,” JP Morgan analysts said in a note.

However, this could be offset by normalising Libyan supply, leading to a largely balanced global oil market in the fourth quarter, followed by a 1 million bpd stockbuild in the first quarter of 2023, they added.

OPEC and its allies will consider keeping oil output unchanged for September when they meet next week, despite calls from the United States for more supply, although a modest output increase is also likely to be discussed, eight sources said.

The U.S. Federal Reserve on Wednesday raised its benchmark overnight interest rate by three-quarters of a percentage point, in line with expectations, to cool inflation.