Oil prices hovered near highs last reached in late 2014, pressured by a stronger dollar, but supported by mounting political tension in the Middle East and shrinking global oil inventories.

U.S. West Texas Intermediate crude futures finished Thursday's session 25 cents higher at $67.07, posting their best settlement since Dec. 3, 2014, when they closed at $67.38.

Brent crude futures were at $72.02 a barrel by 2:25 p.m. ET on Thursday, down 4 cents from their last close.

Both Brent and WTI on Wednesday hit their highest intraday level since late 2014 at $73.09 and $67.45 a barrel respectively after Saudi Arabia said it intercepted missiles over Riyadh and U.S. President Donald Trump warned Russia of imminent military action in Syria.

Analysts said the resulting geopolitical fears had pushed fundamentals aside.

"It appears that immediate supply/demand considerations stay in the background and geopolitics are in focus," said PVM Oil Associates analyst Tamas Varga. "If fundamentals were the driving force, we would not have seen the continuation of this week's rally."

The U.S. dollar was up 0.3 percent against a basket of major currencies, making purchases in other currencies more expensive.

"The dollar index is the biggest factor in prices today," said Phillip Streible, analyst at RJO Futures in Chicago.

On Thursday, OPEC said the global oil stocks surplus was close to evaporating due to healthy energy demand and its own supply cuts.

The group is producing oil below its targets, meaning the world needs to use stocks to meet rising demand. OPEC said in its monthly report oil stocks in the developed world fell by 17.4 million barrels in February to 2.854 billion barrels, around 43 million barrels above the latest five-year average.

OPEC Secretary-General Mohammad Barkindo told Reuters in New Delhi the global oil glut has effectively shrunk by nine-tenths since the start of 2017.

"We have seen an accelerated shrinkage of stocks in storage from unparalleled highs of about 400 million barrels to about 43 million above the five-year average," Barkindo said.