KANANASKIS, Alberta — President Donald Trump said he was departing the Group of Seven summit in Canada on Monday night, leaving a day early due to the intensifying conflict between Israel and Iran.

“President Trump had a great day at the G7, even signing a major trade deal with the United Kingdom and Prime Minister Keir Starmer,” White House press secretary Karoline Leavitt said on social media. “Much was accomplished, but because of what’s going on in the Middle East, President Trump will be leaving tonight after dinner with Heads of State.”

THIS IS A BREAKING NEWS UPDATE. AP’s earlier story follows below.

KANANASKIS, Alberta — World leaders at the Group of Seven summit in Canada scrambled Monday to find a way to contain the conflict between Israel and Iran, with U.S. President Donald Trump warning that Tehran needs to curb its nuclear program before it’s “too late.”

The U.S. president said Iranian leaders would “like to talk” but they had already had 60 days to reach an agreement on their nuclear ambitions and failed to do so before an Israeli aerial assault began four days ago. “They have to make a deal,” he said.

By Monday afternoon, Trump warned ominously on social media: “Everyone should immediately evacuate Tehran!”

The summit’s host at the Rocky Mountain retreat, Canadian Prime Minister Mark Carney, said the world was looking to the G7 for leadership at a “hinge” moment in time.

“We’re gathering at one of those turning points in history,” Carney said. “The world’s more divided and dangerous.”

British Prime Minister Keir Starmer, French President Emmanuel Macron, Italian Premier Giorgia Meloni and German Chancellor Friedrich Merz held an hourlong informal meeting soon after arriving at the summit late Sunday to discuss the widening conflict in the Mideast, Starmer’s office said.

And Merz told reporters that Germany is planning to draw up a final communique proposal on the Israel-Iran conflict that will stress that “Iran must under no circumstances be allowed to acquire nuclear weapons-capable material.”

Trump, for his part, said Iran “is not winning this war. And they should talk and they should talk immediately before it’s too late.” Asked what it would take for the U.S. to get involved in the conflict militarily, Trump said, “I don’t want to talk about that.”

It’s unclear how much Trump values the perspective of other members of the G7, a group he immediately criticized while meeting with Carney. The U.S. president said it was a mistake to remove Russia from the summit’s membership in 2014 and that doing so had destabilized the world. He also suggested he was open to adding China to the G7.