Oil prices advanced on a potential decline in crude shipped from Canada , the U.S. 's biggest source of foreign oil.

Light, sweet crude for August delivery, the front-month contract, rose $1.49, or 1.6%, to settle at $95.18 a barrel on the New York Mercantile Exchange. ICE Brent crude for August delivery gained 25 cents, or 0.2%, to $101.16 a barrel. The gap between Nymex and Brent crude narrowed to $5.98 a barrel, the closest the prices have been since January 2011.

The gains in Nymex prices came after Canadian pipeline operator Enbridge Inc. said it had shut down and isolated a pipeline north of
Cheecham , Alberta , after detecting a spill of some 750 barrels of crude oil that it believes was caused by heavy rain and flooding. Enbridge said it shut down two other pipelines in the area as a precaution. The three pipelines have a total capacity of more than one million barrels of oil a day.

The region around Cheecham is a major center of oil-sands production.

Canada accounted for about 28% of crude-oil imports in the week ended June 14.

"Oil can't go to market" and there is a need to find alternative sources of oil, said Andy Lipow, president of Lipow Oil Associates. "It is unclear how long the outage will be."

Analysts said oil refiners who rely on Canadian crude will instead look to
Cushing , Okla. , to meet near-term needs. A glut of oil at Cushing has kept U.S. oil prices below Brent prices for some time. However, inventories at Cushing were recently at their lowest level in six months.