The attack will likely "provoke significant retaliation" from Iran as well as Iranian-backed militia in Iraq, said Matthew Bey senior global analyst at Stratfor.

International benchmark Brent crude gained $2.42, or 3.6% to trade at $68.67, after earlier trading as high as $69.50. U.S. West Texas Intermediate gained $1.87, or 3%, to settle at $63.05 per barrel. Earlier in the session WTI traded at $64.09, its highest level since April.

The U.S. military took the "decisive defensive action to protect U.S. personnel abroad by killing Qasem Soleimani," a statement by the U.S. Department of Defense said Thursday night. It was a directive from the U.S. president, the DOD said.

Oil prices surged 3% on Friday following confirmation by the Pentagon that Iran's top commander was killed in a U.S. airstrike in Baghdad, raising concerns of a bigger conflict between the two countries that could disrupt energy production in the region.

Iran is likely to return to backing attacks on oil infrastructure in the Persian Gulf and the rest of the Middle East, Bey told CNBC. Tehran could also consider attacks on Saudi Arabia's oil infrastructure if tensions escalate, and it would have both the "capability" and "willingness" to attack major choke points that would "take months to rebuild" in Saudi Arabia, he said.

Soleimani, who led a special forces unit of Iran's elite Revolutionary Guards, was killed, along with Abu Mahdi al-Muhandis, the deputy commander of Iran-backed militias known as the Popular Mobilization Forces, Iraqi television and officials initially reported. He is a key figure in Iranian politics and has been blamed by the U.S. for this week's attack of the U.S. embassy in Baghdad.

"It's been a knee jerk reaction because everybody is asking the question how is Iran going to retaliate, and I think that's why you've seen prices jump 3, 4%," Energy Aspects' Amrita Sen said Friday on CNBC's "Worldwide Exchange." "The real risk is how does Iran retaliate. We've seen what it can do in Saudi Arabia, does it do similar stuff again, is there another attack on Saudi facilities."

She said retaliation will likely "take some time," and that in the meantime oil might give back some of its gains.

"This market is extremely complacent. It never takes into account just how tight the market it ... the general view in the market has been 'oh the world is awash in oil' however incorrect it is, and unless an actual outage lasts, I'm not sure we're going to sustain this rally just yet," she added.

Iran has vowed to retaliate against the U.S, with Iranian Foreign Minister Mohammad Javad Zarif tweeting that "the U.S. bears responsibility for all consequences of its rogue adventurism." Iranian President Hassan Rouhani said the country's stance against the U.S. will be "more decisive" moving forward, while Defense Minister Amir Hatami reportedly said that "a crushing revenge" will be taken by Iran.

Tweet

The Associated Press cited an Iraqi official, speaking on condition of anonymity, who said al-Muhandis had arrived to the airport in a convoy to receive Soleimani whose plane had arrived from either Lebanon or Syria. The airstrike occurred as soon as he descended from the plane to be greeted by al-Muhandis and his companions, killing them all.

Soleimani's body was identified by the ring he wore, according to AP, which cited an Iraqi senior politician.

The attack came amid tensions with the United States after a New Year's Eve attack by Iran-backed militias on the U.S. Embassy in Baghdad. The two-day embassy attack which ended Wednesday prompted President Donald Trump to order about 750 U.S. soldiers deployed to the Middle East.

The airstrike comes following an especially strong fourth quarter for oil, which saw OPEC+ announce deeper-than-expected production cuts in December, and after drone strikes on Saudi Arabia's Abqaiq and Khurais oil facilities rocked international markets. Following that September attack, WTI and Brent both surged around 15%.