NEW YORK (Reuters) - Oil prices hit 2016 highs on Thursday, with U.S. crude surging 5 percent to pierce the $40 barrier, on optimism that major producers will strike an output freeze deal next month amid rising crude exports and gasoline demand in the United States.

A weaker dollar .DXY after a Federal Reserve policy decision on Wednesday that indicated two U.S. rate hikes this year instead of four also drew oil buyers using currencies such as the euro EUR=. [FRX]

OPEC kingpin Saudi Arabia and non-OPEC producers led by Russia will meet on April 17 in the Qatar capital Doha, aiming for the first global supply deal in 15 years.

“The remote possibility that a coordinated supply control effort comes from this meeting, assuming it even happens, has put market bears on the defensive,” said Pete Donovan, broker with Liquidity Energy in New York.

Oil prices have surged more than 50 percent from 12-year lows since the Organization of the Petroleum Exporting Countries floated the idea of a production freeze, boosting Brent up from around $27 a barrel and U.S. crude from around $26.

On Thursday, the front-month in U.S. crude's West Texas Intermediate (WTI) futures CLc1 settled up $1.74, or 4.5 percent, at $40.20, after scaling a 2016 high of $40.36.

Brent crude's front-month LCOc1 finished up $1.21 at $41.54, after earlier reaching the year's peak of $41.60.

“For now, the market is staying well supported,” said Olivier Jakob, oil analyst at Petromatrix. “It will be difficult to return to the lows of the year.”

WTI also hit a premium against Brent CL-LCO1=R in intraday trading, the first time since January, as traders piled into the U.S. crude market on bets of an uptick in domestic oil exports.

Venezuela’s state-run PDVSA bought two more cargoes of WTI this month after becoming Latin America’s first importer of U.S. oil since January after an export ban was lifted.

“We’re seeing increasing export activity in the U.S. Gulf, with over 2-1/2 million barrels currently loaded on tankers, ready to depart, and there’s potentially more,” said Matt Smith who tracks crude loadings for New York-headquartered Clipperdata.

U.S. crude has also gained traction on smaller stockpile builds of late, and surging gasoline consumption.

U.S. crude inventories last week climbed to its fifth straight week of record highs but by just 1.3 million barrels, a much smaller build than forecast, government data showed. Gasoline demand rose 6.4 percent over the past four weeks from a year ago. [EIA/S]

(Story corrects U.S. crude high for 2016 in 6th paragraph to $40.36, not $40.26)