Oil prices appear poised to level off after a nearly six-month rally pushed futures to 2½-year highs at the close of 2017, analysts say. But several geopolitical hot spots could keep the run-up in the energy complex alive.
The oil market owes much of its gains to OPEC and Russia's deal to limit output this year. International benchmark ended the fourth quarter nearly 18 percent higher, near $67 a barrel, while U.S. crude surged nearly 17 percent to more than $60.
Prices got a boost as tensions flared in the Middle East, Venezuela and parts of Africa, and analysts say continued turmoil could be the key to further gains.
"If you want to say, 'How do we break out of this range?' it would be a geopolitical story," Helima Croft, global head of commodity strategy at RBC Capital Markets, told CNBC's "Worldwide Exchange" on Friday.
Oil supplies from Iraqi Kurdistan fell after a dispute between the central government in Baghdad and the semi-autonomous region. Concerns about stability in Saudi Arabia following a political crackdown also boosted markets in the fourth quarter.
In the final weeks of the year, the threat of a strike by oil workers in Nigeria and a pipeline attack in Libya bolstered a rally underpinned by an outage of U.K. North Seas Forties crude.
Croft expects the market to soften in the first quarter of 2018 due to seasonally weak demand — unless one of several first-quarter shocks rears its head.
President Donald Trump could blow up the Iran nuclear deal by restoring sanctions that were suspended in 2016, according to Croft. Trump refused to certify the international accord in October, triggering a 60-day congressional review.
Since then, Congress has made little progress on a solution to address concerns about the deal. Some fear Trump will refuse to continue suspending sanctions this month, causing the deal to collapse and potentially disrupting Iranian oil supplies.
"If he basically says 'I'm not going to waiver sanctions anymore,' those energy sanctions are going to come back," Croft said.
Trump tweeted support for anti-government protests that broke out across Iran last week.
Trump's foreign policy is also at play in Venezuela, which struggled to make billions in debt payments this fall under the weight of U.S. sanctions. Large payments coming due in the first quarter could trigger the clear-cut default that Venezuela avoided this year and hasten the slow but steady decline in its crude oil output, according to Croft.
Analysts are also concerned about growing tensions between Saudi Arabia and Iran, particularly since Iranian-aligned Houthi militants in Yemen have fired missiles toward Riyadh, the Saudi capital. Saudi Arabia and Gulf allies invaded Yemen in 2015 after the Houthis overthrew the government.
The Saudis and the United States have accused Iran of supplying the Houthis with the missiles, with the Saudi-led coalition saying one recent attempted strike could be considered an "act of war" by Iran.
"We've seen them battling each other on a sort of proxy basis on the edges of the region, in Yemen, in Syria," said John Kilduff, founding partner at energy hedge fund Again Capital.
"Does that become more direct hostilities next year? Because certainly the rhetoric out of Saudi Arabia has been quite fiery towards Iran," he told "Worldwide Exchange" on Wednesday.
Kilduff says he's bearish on oil prices, but agrees that geopolitical risks could push up prices, especially since supply and demand have tightened, leaving less of a cushion to prevent price slides.
Oil prices face downward pressure from rising U.S. production, which is approaching all-time highs above 10 million barrels a day. Analysts are also monitoring OPEC and Russia's output deal for signs of cheating on their deal.