ANKARA (Reuters) - Turkey will continue to buy natural gas from Iran in line with its long-term supply contract, Turkey’s energy minister said on Wednesday, a day after U.S. President Donald Trump threatened that anyone trading with Iran will not do business with America.

NATO member Turkey is dependent on imports for almost all of its energy needs and Iran is a key supplier of Ankara’s natural gas and oil purchases. While the Turkish refiner Tupras has already cut back on oil shipments from Tehran, a complete halt of energy imports would be near impossible.

Energy Minister Fatih Donmez told A Haber broadcaster that he expected Ankara’s talks with Washington on the issue to yield a positive outcome.

“A delegation of ours is in the United States right now and negotiations are being held on a series of matters including the sanctions issue,” Donmez told broadcaster A Haber. “I think a good outcome will emerge from this dialogue.”

A Turkish delegation is visiting Washington this week to discuss growing friction between the NATO allies, according to reports on Tuesday, while Washington said the two countries remained at odds on its core demand that Ankara free American evangelical pastor Andrew Brunson.

Donmez said Turkey’s long-term supply contract with the Islamic Republic was valid until 2026 and Ankara was set to buy the 9.5 billion cubic meter of the contract amount. “We will be continuing this trade as we can’t possibly leave our citizens in dark,” he said.

Nearly 40 percent of Turkey’s electricity production is sourced with natural gas.

‘UNİLATERAL’

U.S. President Donald Trump pulled out of a 2015 deal to curb Iran’s nuclear program and said firms doing business with Tehran would be barred from the United States, as new U.S. sanctions against Iran took effect on Tuesday.

The sanctions target Iran’s purchases of U.S. dollars, metals trading, coal, industrial software and the auto sector and did not include Iran’s oil exports, but global oil prices rose on Tuesday in anticipation.

U.S. sanctions on Iran’s energy sector are set to be re-imposed after a 180-day “wind-down period” ending on Nov. 4.

“Anyone doing business with Iran will NOT be doing business with the United States,” Trump tweeted on Tuesday.

Turkey’s biggest oil importer Tupras has cut back purchases of Iranian crude since May, and analysts say Tupras is likely to stick to lower volumes in coming months.

Donmez described the sanctions as “unilateral”.

“Even European Union (EU) is extremely annoyed by this. We are conducting legitimate trade here,” he said. “And this is important for us in terms of supply security as well.”

Pulling out of the 2015 Iran agreement, Trump has ignored pleas from the other world powers that had co-sponsored the deal, including Washington’s main European allies Britain, France and Germany, as well as Russia and China.

European countries, hoping to persuade Tehran to continue to respect the deal, have promised to try to lessen the blow of sanctions and to urge their firms not to pull out. But that has proven difficult: European companies have quit Iran, arguing that they cannot risk their U.S. business.

Reporting by Humeyra Pamuk and Ali Kucukgocmen; Writing by Tuvan Gumrukcu; Editing by David Dolan and Emelia Sithole-Matarise