* Geopolitical factors support prices
* Relentless rise in U.S. crude output caps gains
* Gasoline futures rise to highest since August 2017
* U.S. crude stocks fall in the week ended March 16 -API (Adds API data)
By Stephanie Kelly
NEW YORK, March 20 (Reuters) - Oil prices climbed to their highest level in three weeks on Tuesday as tension in the Middle East and the possibility of further falls in Venezuelan output helped offset the impact of growing U.S. crude production.
Brent crude futures for May delivery rose $1.37 to $67.42 a barrel, a 2.07 percent gain. The global benchmark rose to $67.88 during the session, its highest level since late February.
U.S. West Texas Intermediate (WTI) crude futures for April delivery rose $1.34 to settle at $63.40 a barrel, a 2.2 percent gain. WTI traded between $62.08 and $63.81.
The more active May U.S. crude futures rose $1.41 to settle at $63.54 a barrel.
Prices extended gains in post-settlement trading after data from the American Petroleum Institute showed a surprise draw in U.S. crude inventories.
Stocks fell 2.7 million barrels in the week ended March 16 to 425.3 million barrels, according to the API, compared with analysts’ expectations for an increase of 2.6 million barrels. Government inventory data is due on Wednesday at 10:30 a.m. EDT (1430 GMT).
Geopolitical risks were top of mind on Tuesday. Saudi Arabia called the 2015 nuclear deal between Iran and world powers a “flawed agreement” on Monday, on the eve of a meeting between Crown Prince Mohammed bin Salman and U.S. President Donald Trump.
Trump has threatened to withdraw the United States from the accord between Tehran and six world powers, raising the prospect of new sanctions that could hurt Iran’s oil industry.
“There’s an expectation that (Trump and Prince Mohammed) are going to take a harder line on Iran, and that’s bringing prices up,” said Phil Flynn, a senior energy analyst at Price Futures Group in Chicago.
Worries about falling production in Venezuela, whose output has been halved since 2005 to below 2 million barrels per day (bpd) PRODN-VE due to the country’s economic crisis, also supported oil markets.
The International Energy Agency said last week Venezuela was “vulnerable to an accelerated decline” and that the Latin American country could trigger a renewed drawdown in stocks.
However, increased output in the United States, Canada and Brazil has capped oil price gains. U.S. crude oil production C-OUT-T-EIA has risen more than a fifth since mid-2016, to 10.38 million bpd.
The ramped-up production threatens to undermine cuts made by the Organization of the Petroleum Exporting Countries in an effort to draw down a global supply glut.
Appetite for U.S. crude is adding to the headache facing OPEC. A widening discount of WTI to Brent crude makes it more attractive for foreign refiners to process U.S. oil. Brent is the benchmark for several Middle East and other global crudes.
The premium of Brent crude to WTI WTCLc1-LCOc1 rose above $4 a barrel on Tuesday.
Gasoline futures on the New York Mercantile Exchange rose 2.1 percent on Tuesday to settle at $1.9659 a gallon, the highest level since August 2017.
Data from market intelligence firm Genscape showed gasoline inventories in the New York Harbor region fell by about 1.1 million barrels last week, traders who saw the data said.
Heating oil futures rose 2.2 percent to finish at $1.9495 a gallon, their highest settle since late February.
Additional reporting by Amanda Cooper in London and Henning Gloystein in Singapore Editing by Marguerita Choy and Leslie Adler