Brent oil rose on July 4, driven higher by a threat from an Iranian commander and a drop in U.S. crude inventories for the second week in a row caused by an outage at a Canadian facility.

The price was near session highs above $78 a barrel after an Iranian Revolutionary Guards commander said he was ready to prevent regional crude exports if Iranian oil sales were banned by the U.S..

Brent crude futures were up 5 cents at $77.81/bbl by 1431 GMT, while U.S. crude futures were down 24 cents at $73.90/bbl, paring gains after rallying by as much as 1.2% on July 3.

Iranian President Hassan Rouhani appeared on July 3 to threaten to disrupt oil shipments from neighboring states if Washington continued to press all countries to stop buying Iranian oil.

Looming U.S. sanctions on Iranian crude exports, force majeure in Libya and unplanned pipeline outages in Nigeria have been clouding the supply outlook despite rising output by the OPEC.

"In an ideal world an increase in global or regional oil production would have downward pressure on prices. These are, however, no normal times as supply outages are almost weekly occurrences," PVM Oil Associates strategist Tamas Varga said.

"Under these circumstances it is justified to argue for higher prices when production increases are announced," he said.

Trading is expected to be limited on July 4 by a U.S. national holiday, although the market has been more volatile.

Implied options volatility, a way of measuring uncertainty among crude oil traders and investors, is at its highest since the run-up to last month's OPEC meeting where an agreement was reached to ease up on output curbs in place since January 2017.

With the outlook unclear, investors were turning to options to protect themselves against any sudden move, said Harry Tchilinguirian, head of commodities strategy at BNP Paribas.

"When there is consolidation in the market, there is also the expectation of an eventual price breakout in either direction. So in the options market, the volatility gets bid up," he told the Reuters Global Oil Forum.

Investors can bet on various aspects of an option, from the premium to the price to how much that option might move.