WASHINGTON/PARIS - European officials are making headway toward an agreement to address U.S. concerns about the Iran nuclear deal, a European diplomat said on Thursday, but a second diplomat said it was unclear if U.S. President Donald Trump would embrace their work.

"We came out feeling like we are making good progress towards addressing the president's concerns and coming (up) to an agreement," the first European diplomat told a small group of reporters, speaking on condition of anonymity.

Senior diplomats from the three European nations that are party to the deal met Brian Hook, the U.S. State Department's director of policy planning, in Washington on Wednesday to try to find a way to salvage the arms control pact.

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.

On Jan. 12, Trump delivered an ultimatum to Britain, France and Germany, saying they must agree to "fix the terrible flaws of the Iran nuclear deal" or he would refuse to extend the U.S. sanctions relief that it calls for. U.S. sanctions will resume unless Trump issues new "waivers" to suspend them on May 12, although it is unclear how fast they would go into effect.

Trump sees three defects in the deal: a 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. Trump wants all three strengthened if the United States is to stay in the deal.

A second European diplomat was more pessimistic, telling Reuters that even if U.S., British, French and German diplomats reach agreement it was unclear whether Trump would embrace it.

Asked if Trump would sign on, this European diplomat told Reuters: "Anything is possible, but if he doesn’t renew the waivers the situation will deteriorate quickly. Confidence will be dead and the Iranians risk pulling out themselves.

"I’m not especially optimistic," the diplomat added. "In the end it will be decided by one volatile person."

Speaking on condition of anonymity, the diplomat told Reuters that British, French, German and U.S. foreign ministry political directors are working on three documents ahead of the May 12 deadline, but did not provide details.

"If the U.S. agrees to ... working with the Europeans to ensure the Iranian nuclear program is only for civilian use forever then we can agree on something," the diplomat told Reuters.

"But we can’t do something that is contrary to the JCPOA. And let’s be clear, if (we) lose the JCPOA then perversely it will have the opposite effect of what the Americans want. The breakout time won’t be a year but a few weeks," he added.

The Joint Comprehensive Plan of Action (JCPOA) is the formal name of the Iran nuclear deal. Breakout time refers to the amount of time it would theoretically take Iran to produce enough fissile material for an atomic bomb.

Iran, which pledged under the deal not to seek nuclear arms, says its nuclear program is only for peaceful purposes. It has said it will stick to the accord as long as the other parties respect it, but will "shred" the deal if Washington pulls out.

(Reporting by Arshad Mohammed and John Irish Writing by Arshad Mohammed; Editing by Cynthia Osterman and Leslie Adler) ((arshad.mohammed@thomsonreuters.com; +1-202-898-8300; Reuters Messaging: arshad.mohammed.thomsonreuters.com@reuters.net))