Updated from 7:56 a.m. EDT

Oil prices closed lower Friday after a two-day run-up that took prices close to $39 a barrel again on growing concerns about short-term supplies.

The benchmark U.S. crude ended 39 cents, or 1%, lower at $38.35 in a shortened session ahead of the Independence Day holiday weekend. The New York Mercantile Exchange is closed Monday.

Oil prices have swung wildly this week, falling to less than $36 a barrel and a three-month low Tuesday as Iraqi exports returned to normal and the U.S., in a surprise move, handed over power to local authorities two days ahead of schedule.

But a pair of reports Wednesday showing an unexpected drop in oil inventories ended the slump and triggered another march higher, with prices gaining about 9% in just two sessions.

Thursday's gains came despite the fact that the Organization of Petroleum Exporting Countries' new production ceiling kicked in. The cartel in June agreed to raise its official production by 2 million barrels to 25.5 million barrels a day in July. OPEC also said it would review market needs at a July meeting and increase output by another half-million barrels in August, if necessary.

Oil prices had fallen about 15% from their record high of $42.32, which was touched right before OPEC's meeting four weeks ago.

Traders bid up prices on short-term supply concerns that were triggered by strong global demand and terrorist attacks on oil industry personnel and facilities in the Persian Gulf region ahead of the peak summer driving season in the U.S. and Europe.

If you liked this article you might like

Spain to Play Netherlands for World Cup

Spain to Play Netherlands for World Cup

Wal-Mart: Analysts' Upgrades, Downgrades

Wal-Mart: Analysts' Upgrades, Downgrades

Netherlands Advances to World Cup Final

Netherlands Advances to World Cup Final

Apple: Analysts' Upgrades, Downgrades

Apple: Analysts' Upgrades, Downgrades

World Markets Mostly Lower Monday

World Markets Mostly Lower Monday