Oil prices ended lower on Friday, influenced by a stronger dollar, yet achieved a second consecutive weekly gain due to signs of improving demand in the U.S., the world’s largest oil consumer.

U.S. crude futures settled at $80.73 per barrel, down 0.7%, while Brent crude dropped 0.7% to $85.24 per barrel.

The dollar’s strength, spurred by unexpectedly strong services and manufacturing data for June, tempered oil demand by making it more expensive for foreign buyers. Despite this, positive demand sentiment prevailed, buoyed by recent data indicating a decline in U.S. crude and gasoline inventories.

The Energy Information Administration reported a larger-than-expected drawdown of 2.5 million barrels in U.S. crude stockpiles for the week ending June 14. Additionally, U.S. demand, as measured by total product supplied, increased by 1.9 million barrels per day to 21.1 million bpd.

Geopolitical tensions added support, with Ukraine’s military striking oil facilities in Russia and continued conflict between Israel and Hamas raising concerns over potential disruptions in the oil-rich region.