Brent crude is set to end the year up nearly 14 percent from a year ago, supported by signs of an improving U.S. economy and Iran's threats to halt oil flow through a vital trade route.

Brent rose 19 cents to $108.20 a barrel by 0701 GMT in the final trading day of 2011, with gains limited by a surprise rise in U.S. stockpiles and a slowdown in output from Chinese factories.

Brent is poised to close the year at a record-high average of around $111 a barrel, surpassing the previous annual peak of just below $100 reached in 2008. With the exception of 2008, oil prices have closed higher every year for the last decade.

U.S. crude rose 18 cents to $99.83 and is on track to record a 9 percent gain for the year.

The oil market will end 2011 the same way it started, with fears of a major oil supply disruption in the Middle East and North Africa supporting prices.

Iran's repeated threats this week to halt oil flow through the Strait of Hormuz has helped keep intact a risk premium on prices that first emerged this year with the Libyan uprising.

The Middle East premium from Libya has not yet completely eroded as a result of what is happening in Iran, said Jonathan Barratt, chief executive of and ex-managing director of Commodity Broking Services.

We are seeing the premium rebuild, which is keeping the spread (between U.S. crude and Brent) at around $8-9.

A senior Iranian Revolutionary Guards commander said on Thursday the United States was not in a position to tell Tehran what to do in the Strait of Hormuz, state television reported, after the U.S. said it would preserve oil shipments in the Gulf.

His remarks follow threats by Iran's navy chief and first vice president earlier this week that Iran could disrupt oil tankers sailing through the key shipping lane if the West imposes sanctions on its crude exports.

U.S. economic data on Thursday also helped support prices.

New U.S. claims for jobless benefits rose last week but the underlying trend pointed to an improving labour market, while regional factory data showed the world's largest economy gaining momentum as the year ended.

When traders get back to the market, they will be focused on the recovery in the United States. As the number one consumer, that may override the demand destruction we are seeing in India, China and Japan, Barratt said.

U.S. recovery hopes helped offset a surprise rise in U.S. crude stocks and signs that China's once turbo-charged economy was slowing down.

China's factory activity shrank again in December as demand at home and abroad slackened, a purchasing managers' survey showed on Friday, reinforcing the case for pro-growth policies to underpin the world's second largest economy.

In the United States, crude stocks climbed 3.9 million barrels last week, the Energy Information Administration said on Thursday, confounding analysts' expectations for a 1.7 million barrel drawdown.

(Editing by Michael Urquhart, Himani Sarkar)