CALGARY, Alberta (Reuters) - U.S. oil prices closed above $60 a barrel on the final trading day of the year, the first time since mid-2015, as the commodity ended 2017 with a 12 percent gain spurred by strong demand and declining global inventories.

FILE PHOTO: A pumpjack brings oil to the surface in the Monterey Shale, California, April 29, 2013. REUTERS/Lucy Nicholson/File Photo

International benchmark Brent crude futures ended the year with a 17 percent rise, supported by ongoing supply cuts by top producers OPEC and Russia as well as strong demand from China. The spread between the benchmarks widened throughout the year, as Brent responded to the drawdown in supply from major world producers while U.S. output continued to grow.

The gains indicate that the global glut that has dogged the market since 2014 is shrinking.

Earlier this year, oil prices slumped on concerns that rising crude production from Nigeria, Libya and elsewhere would undermine output cuts led by the Organization of the Petroleum Exporting Countries and Russia. But prices have rallied nearly 50 percent since the middle of the year on robust demand and strong compliance with the production limits.

“That trend is likely to continue into 2018 and worldwide oil inventories will continue their decline,” said Andrew Lipow, president of Lipow Oil Associates in Houston.

Lipow said he expected U.S. crude prices to creep up to around $63 a barrel by the end of next year, while Brent would remain around $67 a barrel as U.S. oil exports rise to record levels.

U.S. West Texas Intermediate (WTI) crude futures settled at $60.42, the highest close since June 2015. Brent crude futures were last up 45 cents at $66.62 a barrel at 1932 GMT. Brent broke through $67 this week for the first time since May 2015.

WTI prices were supported by data from the U.S. Energy Information Administration late on Thursday showing domestic oil production declined last week to 9.75 million barrels per day (bpd) from 9.79 million bpd the previous week.

Monthly EIA data released on Friday showed U.S. crude production hit a 46-year high in October, but the country’s oil exports and demand also rose.

U.S. output is up almost 16 percent since mid-2016. Analysts expect production to top 10 million bpd in the next few weeks and to keep growing, limiting efforts by other producers to cap global supplies.

“The U.S. shale impact is now encroaching on uncharted territory,” analysts at RBC Capital Markets wrote this month, saying it had “redrawn the global crude flow map.”

WTI prices were further boosted by an EIA report of a 4.6 million barrel weekly drop in U.S. commercial crude storage levels. Inventories are down by almost 20 percent from historic highs last March, and well below this time last year or in 2015.

Extreme cold weather across much of North America could also boost U.S. crude prices by causing production problems in the oilfields.

PIPELINE OUTAGES

In international markets, China has issued crude oil import quotas totalling 121.32 million tonnes for 44 companies in its first batch of allowances for 2018.

China’s imports at around 8.5 million bpd, already the world’s biggest, are expected to hit another record in 2018 as new refining capacity is brought online and Beijing allows more independent refiners to import crude.

Pipeline outages in Libya and the North Sea have supported oil prices, although both disruptions are expected to be resolved by early January.

Libya is to start repairing the pipeline near the Es Sider terminal this weekend, a Libyan oil official said, while the Forties pipeline was already pumping close to normal levels, according to trading sources.