Oil prices firmed on Friday as strong Chinese oil import data and turmoil in the Middle East boosted a market that is showing signs of rebalancing after years of oversupply.
U.S. West Texas Intermediate (WTI) crude ended Friday's session 85 cents, or 1.7 percent, higher at $51.45 per barrel. It was up about 4 percent on the week.
Brent was up 94 cents, or 1.7 percent, $57.19 at 2:29 p.m. ET, on track for a weekly gain of more than 2 percent.
Prices pared earlier gains after President Donald Trump said he would refuse to certify the Iran nuclear deal and could terminate the international agreement if he cannot reach a solution with Congress and allies. The deal paved the way for the recovery of Iran's oil exports, and Trump's actions could potentially lead to renewed sanctions.