Oil prices spiked to their highest level in two and a half years after a pipeline exploded in Libya.

Libya's state-run National Oil Corporation said the explosion jeopardized output by up to 100,000 barrels a day. The cause of the blast was unclear, the agency said.

U.S. crude oil prices spiked up to 2.5% Tuesday to more than $60 a barrel, the highest level since June of 2015. Last month, oil prices jumped after the Keystone pipeline shut down following an oil spill.

Still, prices remain low compared with $100-a-barrel prices three years ago.

There's been a glut of oil in recent years, forcing the Saudi-led OPEC cartel to cut production to lower supply.

Oil crashed in 2014 and 2015 and reached a low of $26 a barrel in 2016. Prices slowly rebounded after the 14-member OPEC group agreed to limit production. OPEC agreed in November to extend those cuts until the end of 2018.

Libya is one of two countries in OPEC that doesn't have a cap on oil production because of unrest.

OPEC originally tried to flood the market with cheap oil in the face of the U.S. shale boom, but backpedaled on the strategy as it became clear it was waging a losing battle.

With the war against OPEC halted and shale production re-energized, the U.S. is poised for record oil output in 2018.

--CNNMoney's Matt Egan contributed to this story.