President Donald Trump holds up a proclamation declaring his intention to withdraw from the JCPOA Iran nuclear agreement after signing it in the Diplomatic Room at the White House in Washington, U.S. May 8, 2018.

Oil prices finished Wednesday's session at new 3½-year highs after U.S. President Trump abandoned a nuclear deal with Iran and announced the "highest level" of sanctions against the OPEC member.

Ignoring pleas by allies, Trump on Tuesday pulled out of an international nuclear deal with Iran that was agreed in late 2015, raising the risk of conflict in the Middle East and casting uncertainty over global oil supplies at a time when the crude market is already tight.

Futures extended gains after the U.S Energy Information Administration reported U.S. stockpiles of both crude oil and gasoline fell by 2.2 million barrels in the week through May 4.

U.S. light crude ended the session up $2.08 a barrel, or 3 percent, at $71.14. The contract topped out at $71.36 on Wednesday, the highest intraday level since November 2014.

Brent crude oil also touched its highest since November 2014 at $77.43 on Wednesday. The benchmark contract was up $2.36 a barrel, or 3.2 percent, at $77.21 by 2:29 p.m. ET.