Brent crude futures were up 43 cents at $56.99 a barrel by 1515 GMT, having lost 24 cents in the previous session, Reuters reported.

Brent was on track for a more than 2 percent gain on the week, its first significant weekly rise this year.

Front month U.S. West Texas Intermediate crude futures climbed 37 cents to $53.91, after closing 34 cents down on Thursday. The contract is up by nearly 1 percent on the week.

Read alsoLukashenko: Belarus can do without Russian oilU.S. President Donald Trump had warned on Twitter that "Iran is playing with fire" after its missile test, and the U.S. Treasury said on Friday that it would announce new sanctions on Iran, including individuals and entities based in the United Arab Emirates, Lebanon and China.

"The 'trumperament' of the new U.S. president is being tested by Iran and soon maybe also by Russia and China," said Olivier Jakob, managing director of consultancy PetroMatrix. "And that is adding some geopolitical support to crude oil."

Read alsoUkraine's oil giant Ukrnafta forecasts 15% drop in output in 2017The sanctions announcement added to volatility in what had already been a day of choppy trading. Analysts said the market is torn between promised cuts from the Organization of the Petroleum Exporting Countries (OPEC) and fears over rising U.S. shale oil production.

Earlier in the afternoon the oil contracts gave up gains and briefly turned negative on U.S. jobs data.

Hans van Cleef, senior energy economist with ABN Amro, said there could be more choppy trading after Baker Hughes releases U.S. rig count data later in the day, giving an indication on future U.S. production.

The prospect of more oil output from Nigeria and other non-OPEC producers such as Brazil also looms.

"Record speculative length threatens to trigger a sharp price fall as unease builds," Commerzbank said in a note.