TORONTO -- North American markets were on pause Thursday, even as oil prices extended gains for a third straight day, climbing to a level not seen in six months.

Rebounding from negative territory earlier in the session, the June contract for North American benchmark crude finished 47 cents higher at US$46.70 a barrel.

The advance came even after the International Energy Agency said higher than expected Iranian oil production had helped stabilize the global oil market by offsetting concerns generated by wildfires in the Fort McMurray area of Alberta and by violence in Nigeria.

In its monthly report, the Paris-based IEA said global oil output rose to 32.7 million barrels a day in April, a figure boosted by Iran, which has ramped up production following the lifting of international sanctions earlier this year.

On the flip side, some in the oilpatch are working to limit drilling in hopes of bringing oil prices higher.

"The (oil) industry has been quite aggressive in curtailing capital expenditures. If you cut capex and stop drilling for oil, one of the inevitable outcomes of those choices is that production slowly moves from growing to flat to actual declines," said Colum McKinley, vice-president of Canadian Equities at CIBC Asset Management.

"We're at the early stage for production declining in the industry, which again will contribute to the supply and demand balance. You're going to continue to see that through the latter part of the year. That bodes well for the commodity price and the (energy) stocks."

But Thursday's gain wasn't enough to spur much movement on Toronto and New York stock markets.

The S&P/TSX composite was flat, losing 0.41 of a point to 13,787.80, with declines in gold and metal stocks offsetting gains in the consumer discretionary and financial sectors.

The Canadian dollar added 0.11 of a U.S. cent to 77.92 cents US.

New York markets were also going sideways as traders digested data that showed continued weakness in the retail and employment sectors.

The U.S. Labor Department said applications for unemployment benefits rose to the highest level since February 2015.

Applications rose by 20,000 to 294,000 in April. Despite the increase, they have remained below 300,000 for more than a year.

On Wall Street, the Dow Jones industrial average gained 9.38 points to 17,720.50 and the broader S&P 500 lost 0.35 of a point to 2,064.11. The tech-heavy Nasdaq fell 23.36 points to 4,737.33.

Elsewhere in commodities, the June contract for natural gas retreated two cents to US$2.16 per mmBtu, while June gold gave back $4.30 to US$1,271.20 a troy ounce and July copper lost three cents to US$2.07 a pound.