Updated from 2:13 p.m. EDT

Oil prices erased early gains, closing below $38 a barrel for the first time in five weeks Tuesday, after snapping a three-day losing streak Monday.

Crude fell $1.51, or 3.9%, to $37.15 while gasoline futures ended 4 cents, or 3.4%, lower at $1.16 a gallon. Prices initially rose following an explosion in the Iraqi city of Mosul that killed at least nine people. The U.S. military said it suspected a car bomb caused the blast.

Prices briefly fell through $38 a barrel Monday in the wake of the Organization of Petroleum Exporting Countries' decision last Thursday to raise its official production ceiling by as much as 2.5 million barrels a day.

The decision, which was largely telegraphed in advance, eased immediate worries about supply, which had pushed prices to record highs in recent weeks.

Traders have been concerned about a disruption in supply from the oil-rich Persian Gulf region after several terrorist attacks on industry facilities in Iraq and Saudi Arabia, the world's biggest oil exporter.