By Barani Krishnan

NEW YORK (Reuters) - Oil prices rose on Tuesday after Reuters reported Iran was sending positive signals that it may support joint OPEC action to prop up the market, before the market pared gains on trade data showing a surprise build in U.S. crude stocks.

Iran, the third-largest producer in the Organization of the Petroleum Exporting Countries, refused to join a previous attempt this year by the group and non-OPEC members led by Russia to stabilize production. But sources in OPEC and the oil industry told Reuters that Tehran appeared more willing to support such talks scheduled next month in Algeria.

"Iran is reaching its pre-sanctions production level soon and after that it can cooperate with the others," said a source familiar with Iranian thinking after a visit by Venezuelan Oil Minister Eulogio Del Pino to Tehran as part of a tour to convince OPEC of a production freeze.

Brent crude settled up 80 cents, or 1.6 percent, at $49.96 a barrel, while U.S. West Texas Intermediate (WTI) crude rose 69 cents, or 1.5 percent, to close at $48.10.

Tehran has been boosting its oil output since the lifting of Western sanctions in January. News of its potential support for a production freeze helped halt an abrupt slump in crude prices that began on Monday, after a 20-percent rally in the past two weeks.

Still, Brent and WTIpared gains in post-settlement trade after the American Petroleum Institute (API) reported that U.S. crude inventories rose by 4.5 million barrels last week, a surprising build versus analyst expectations' for a draw of 500,000 barrels. The U.S. government will issue official inventory data on Wednesday. [EIA/S]

Despite rebounding this year, oil still trades at less than half of mid-2014 levels, with the market still worried about a glut that spurred the biggest price rout in a generation.

The selloff has battered the economies of Venezuela, Iraq and Nigeria, which are more anxious to boost crude prices than major OPEC producers such as Saudi Arabia and Iran, which are keen to protect market share.

Many analysts remain skeptical of the effort to freeze production. Goldman Sachs maintained a "weak" $45-$50 price forecast through the 2017 summer.

"The current price level of well over $40 does not provide non-OPEC producers with any kind of motivation to support oil prices by cutting or maintaining current production levels," said Tamas Varga, analyst at London-based energy broker PVM.

(Additional reporting by Alex Lawler in London and Henning Gloystein in Singapore; Editing by Jonathan Oatis and Andrew Hay)