NEW YORK--Oil futures weakened for a third straight session Monday on increased confidence that unrest in Iraq would not interrupt the country's oil exports.

Light, sweet crude for August delivery settled down 37 cents, or 0.4%, at $105.37 a barrel on the New York Mercantile Exchange.

Brent crude on the ICE futures exchange slid 94 cents, or 0.8%, to $112.36 a barrel.

Prices fell to their lowest levels since June 11, one day before they soared in response to news that Sunni insurgents had seized Iraq's second-largest city.

"We've now pulled back to, really, the level where we took off," said Bob Yawger, director of futures at Mizuho Securities USA Inc. "We are in the process of clawing back some of that territory we gave away on Iraqi concerns."

Even still, the recent rally helped oil prices post their best one-quarter gain since the third quarter of 2013.

U.S. oil prices finished the quarter up 3.7% and the first half of the year up 7.1%. Futures rose 2.6% this month.

Brent gained 4.3% this quarter and 1.4% in the first half of the year. Prices rose 2.7% for the month.

Iraq exported 2.7 million barrels a day of crude oil in May, according to the International Energy Agency. Any loss of supply from the country could sharply tighten global inventories and put pressure on other producers to ramp up output.

However, Iraqi oil production is based in the south of the country, far from the current fighting, and has yet to be disrupted.

"The international community has come to the realization that the Sunni militants are going to be hard-pressed to move into that area in anytime in the near future," Mr. Yawger said.

Front-month July reformulated gasoline blendstock, or RBOB, fell 2.18 cents, or 0.7%, to $3.0770 a gallon. Futures rose 2.7% this month and are up 11% year-to-date.

The July contract expired at settlement. August gasoline futures settled down 3.09 cents, or 1%, at $3.0433 a gallon.

July diesel, which also expired at settlement, fell 2.68 cents, or 0.9%, to $2.9708 a gallon. Prices rose 3% this month but have fallen 3.5% since the end of 2013. August diesel slid 2.82 cents, or 0.9%, to $2.9753 a gallon.