By Myra P. Saefong and Nora Redmond

The strike came in response to Iran's Thursday attack on a commercial ship that was transiting through the Strait of Hormuz

Oil prices fell during Friday's trading session - but rose after hours in the wake of a U.S. retaliatory strike on Iran.

Oil futures settled lower to post a third-straight weekly loss on Friday, but moved up in extended trading after the U.S. military confirmed a retaliatory strike on Iran.

The news broke just minutes ahead of the conclusion of the after-hours electronic trading session, leaving little time for traders to react to the development. The strike came in response to Iran's Thursday attack on a commercial ship that was transiting through the Strait of Hormuz.

The U.S. appeared to take a "typical page from the playbook" where it has to do something in reaction to Iran's aggression, but "just a quick strike on limited targets and then move forward with the peace talks," said Tariq Zahir, managing member at Tyche Capital Advisors, following the news of the U.S. strike.

Now, the 'ball is in the court of the Iranians.'Tariq Zahir, Tyche Capital Advisors

Now, the "ball is in the court of the Iranians," he told MarketWatch late Friday afternoon. If Tehran continues to target ships in the strait or closes the waterway down, Zahir said he expects U.S. President Donald Trump "to run out of patience at some point and [for] a bigger strike to take place."

The West Texas Intermediate crude-oil contract for August delivery (CL00) (CL.1) (CLQ26) was at $70.24 a barrel by the end of the after-hours session, up from the day's settlement at $69.23. Prices had fallen 3.7% for the session and lost 8.7% for the week, according to Dow Jones Market Data.

Brent crude's August contract (BRN00) (BRNQ26) was at $72.98, moving up from its settlement at $71.99, after posting a loss of 4.3% Friday and a nearly 11% weekly decline.

Both oil benchmarks posted their third-straight week of losses, with each down more than 20% month to date.

Earlier Friday, Trump confirmed in a social-media post that Iran had violated its cease-fire deal with the U.S. by attacking a ship in the Strait of Hormuz.

In turn, some analysts said oil prices had fallen too quickly given ongoing uncertainty.

"Oil prices are still going to be volatile," Zahir said ahead of the U.S. strike, noting that they had "fallen too far, too fast."

He added that the cease-fire was "very fragile" and that traders should "expect volatility to continue on headline risks until we see some solid agreement and the strait completely open without tolls."

Crude oil has been the "alpha leader for commodities" in responding to Iran war news, as prices ran up more quickly at the start of the conflict relative to gasoline and other commodities, and had been been leading the way back down faster as well, said Colin Cieszynski, chief market strategist at SIA Wealth Management.

Oil prices had briefly rebounded on Thursday, driven by Iran signaling that it was tightening its control over the Strait of Hormuz after authorities said vessels not following their approved routes "will be dealt with accordingly."

Questions continue to surround the free passage of ships through the strait, with Bloomberg reporting Friday that Oman had told European officials that ships may be charged some fees to transit the waterway.

-Myra P. Saefong -Nora Redmond

This content was created by MarketWatch, which is operated by Dow Jones & Co. MarketWatch is published independently from Dow Jones Newswires and The Wall Street Journal.