WASHINGTON (Reuters) - The United States has had constructive talks about the Iran nuclear deal with Britain, France and Germany but is making contingency plans should they fail, the lead U.S. negotiator said on Wednesday.

FILE PHOTO: The flag of the International Atomic Energy Agency (IAEA) flies in front of IAEA's headquarters during a board of governors meeting in Vienna, Austria June 12, 2017. REUTERS/Heinz-Peter Bader

U.S. President Donald Trump gave an ultimatum on Jan. 12 to the European powers, saying they must agree to “fix the terrible flaws” of the 2015 Iran nuclear deal or he would refuse to extend the U.S. sanctions relief on Iran that it calls for. U.S. sanctions will resume unless Trump again waives them on May 12.

“We have had constructive talks with the Europeans toward a supplemental agreement but I can’t predict whether we will reach an agreement with them or not,” Brian Hook, the State Department policy planning director, told reporters in a conference call.

“We are engaged in contingency planning because it would not be responsible not to,” said Hook, the lead U.S. negotiator in the talks with the Europeans. “We are kind of dual tracking this.”

Hook held talks with the three European powers in Berlin on Thursday followed by wider talks on Friday in Vienna with a group that tracks the implementation of the nuclear deal negotiated under former President Barack Obama’s administration.

The United States also had a bilateral meeting with Iran in Vienna to demand the release of U.S. citizens held by Tehran, Hook said.

A senior Iranian foreign ministry official confirmed that the United States had raised the issue in the bilateral talks, saying that the Iranian side had responded that this was a matter for the Iranian judiciary, which acts independently.

“However, on humanitarian grounds, we said we will do whatever possible,” said the Iranian official on condition of anonymity, adding that at the same meeting “Iran asked for the release of Iranians jailed” in the United States.

He also said the issue was discussed with the foreign minister of Oman when he visited Tehran earlier this month.

The crux of the 2015 agreement between Iran and six major powers - Britain, China, France, Germany, Russia and the United States - was that Iran would restrict its nuclear program in return for relief from sanctions that have crippled its economy.

Trump sees three defects in the deal: its failure to address Iran’s ballistic missile program; the terms under which international inspectors can visit suspect Iranian nuclear sites; and “sunset” clauses under which limits on the Iranian nuclear program start to expire after 10 years. He wants all three strengthened if the United States is to stay in the deal.

Iran is technically complying with the agreement, Hook said.

However, he repeated the Trump administration view Iran is violating the deal’s preamble, which expressed the expectation that the agreement’s “full implementation ... will positively contribute to regional and international peace and security.”

Some analysts reject this stance, arguing the expression of this expectation did not imply a commitment on Iran’s part.

Iran argues it is not receiving the full benefits of the sanctions relief, in part because big banks have continued to stay away for fear of falling foul of remaining U.S. sanctions.

Hook said he had rejected this argument.

“Iran’s opaque economy makes it hard for investors to know whether they’re supporting commerce or supporting terrorism,” he said. “Iran needs to stop sponsoring terrorism and overhaul its banking and business sectors.”

He also played down Iranian concerns that Trump has yet to approve licenses for Western aircraft companies to sell to Iran although the Obama administration did so.

“I said to them you use your commercial airlines to move terrorists and weapons around the Middle East, including to Syria, and we will not issue licenses at the expense of our national security,” Hook said.

European planemaker Airbus and its U.S. rival Boeing have agreed to sell a total of 180 jets to renew the aging fleet of state carrier IranAir, but depend on U.S. support for the deal because of the number of U.S. parts in all their jets.