(Adds Macron quote from toasts; paragraph 18)
By Steve Holland, Marine Pennetier and Jeff Mason
WASHINGTON, April 24 (Reuters) - U.S. President Donald Trump and French President Emmanuel Macron pledged on Tuesday to seek stronger measures to contain Iran, but Trump refrained from committing to staying in a 2015 nuclear deal and threatened Tehran with retaliation if it restarted its nuclear program.
At a news conference with Macron, the U.S. president kept up his blistering rhetoric against the nuclear accord between Iran and world powers that he says does not address Tehran's rising influence in the Middle East or its ballistic missile program.
He called it insane, terrible and ridiculous.
"This is a deal with decayed foundations," Trump said. "It's a bad deal. It's falling down."
With a May 12 deadline looming for Trump to decide on restoring U.S. economic sanctions on Tehran, Macron said he spoke to Trump about a "new deal" in which the United States and Europe would tackle the outstanding concerns about Iran beyond its nuclear program.
Macron is using a three-day state visit to the United States as a high-stakes bid to salvage the Iran nuclear deal, which many in the West see as the best hope of preventing Iran from getting a nuclear bomb and heading off a nuclear arms race in the Middle East.
Under Macron's proposal, the United States and Europe would agree to block any Iranian nuclear activity until 2025 and beyond, address Iran's ballistic missile program and generate conditions for a political solution to contain Iran in Yemen, Syria, Iraq and Lebanon.
It was unclear whether Macron made substantial progress in his efforts to prevent Trump from pulling out of the 2015 deal, and Trump stressed there would be repercussions should Iran restart its nuclear program.
"If Iran threatens us in any way, they will pay a price like few countries have ever paid," Trump said.
But Trump said: "We will have a great shot at doing a much bigger, 'maybe deal, maybe not' deal." The French believe progress had been made.
"What was important and new this morning was that President Trump was OK with putting on the table, with France, the idea of a new agreement that should be proposed to, and worked on with, the Iranians," a French official said.
It was unclear what that would mean for the fate of the 2015 accord and whether the other countries that signed it, such as China and Russia, would agree to new measures against Iran.
German Chancellor Angela Merkel was expected to also make a case for the accord during a lower-key visit to the White House on Friday.
A source familiar with the internal debate at the White House said one option under discussion was giving Europe more time to toughen the terms of the current Iran deal.
Iran has said it will ramp up its nuclear program if the deal collapses and a senior Iranian official said Tehran might quit a treaty designed to stop the spread of nuclear weapons if Trump scrapped the agreement.
Trump and Macron have developed a strong relationship at a time when many European leaders have kept a certain distance from Trump.
"On both sides of the ocean some two years ago, very few would have bet on us being here together today," Macron told Trump in a toast at a glittering state dinner, Trump's first since he took office in January 2017.
"I got to know you. You got to know me. We both know that none of us easily changes his mind," Macron said with a smile.
Trump, 71, and Macron, 40, were remarkably chummy through the day, repeatedly shaking and grabbing each other's hands, exchanging kisses on the cheek and slapping each other's backs.
At one point in the Oval Office, Trump brushed what he said was dandruff from Macron's jacket, saying: "We have to make him perfect - he is perfect."
Macron hopes to leverage their friendship into progress on not only Iran but exempting Europe from steel tariffs, and protecting the 2016 Paris climate accord.
Their talks also covered the U.S. presence in Syria weeks after the United States, France and Britain launched air strikes in retaliation for a chemical weapons attack blamed on Syrian President Bashar al-Assad.
Trump wants to withdraw U.S. forces from Syria, believing Islamic State militants are largely defeated, but Macron and other allies argue they should stay to ensure militants do not resurface and to block Iran from strengthening its foothold.
Trump made clear troops would not be withdrawn imminently.
"We want to come home. We'll be coming home. But we want to leave a strong and lasting footprint," Trump said.
The two leaders also discussed European calls for exemptions from Trump's plan for 25 percent tariffs on steel imports.
Later on Tuesday, Trump hosted Macron at a formal candlelit dinner featuring spring lamb and New Orleans-style jambalaya before a performance by the Washington National Opera.
More than 1,200 fragrant branches of cherry blossom filled the hall.
First lady Melania Trump drew attention with a wide-brimmed white hat worn to welcome the Macrons. At the state dinner, she wore a black Chantilly lace Chanel haute couture gown, while Brigitte Macron wore Louis Vuitton.
Chief executives in the room included Tim Cook of Apple , Marillyn Hewson of Lockheed Martin, Fred Smith of FedEx and Ginni Rometty of IBM.
Media mogul Rupert Murdoch attended, as did private equity executives Henry Kravis of KKR, David Rubenstein, co-founder of Carlyle Group, and Blackstone Group’s Stephen Schwarzman. (Writing by Steve Holland; Additional reporting by Roberta Rampton, Doina Chiacu, Makini Brice and Lesley Wroughton; Editing by Alistair Bell and Peter Cooney)