And Joe Biden—a frequent target of his political rivals for his alleged weakness on the world stage—was likely the one most responsible for defusing it.

On social media, users quickly made the subject of “World War 3” a trending topic. News organizations quickly filed explainer pieces outlining what it would take for NATO to invoke Article 5 of its charter, drawing Poland and its allies into the war. And around the world, the public fixated on prior statements made by President Joe Biden that the United States would fight to defend “every inch” of NATO soil.

Wednesday, however, saw a rapid soothing of tensions. Both Poland and NATO issued statements characterizing the missile strike as a “tragic accident” after the ensuing investigation determined the missile was likely fired by Ukraine as it defended itself against a barrage of missile fire by invading Russian forces. And Russia—which quickly sought to distance itself from the accidental strike Tuesday—had an unlikely ally to thank for averting crisis: Biden.

Abroad and under intense media scrutiny Tuesday, Biden was among the first world leaders to express doubt the strike on Poland came from Russian sources. In consecutive media briefings that afternoon, officials with both the U.S. Department of State and the Pentagon shied away from speculating on the source of attacks or placing immediate blame on Russia for the incident, going only as far to say the United States would honor its commitment to defend NATO territory if it was the focus of a direct assault.

As the fog of the incident began to clear, even Russia itself, which has regularly accused the western world of being the true aggressor in its conflict against Ukraine, praised Biden for his restraint.

While Kremlin spokesperson Dmitry Peskov told media Wednesday that the incident featured numerous lessons about why “one should never rush to pronounce judgements and statements that can escalate the situation,” the Kremlin pointed to a much more restrained response from Biden as an example of how to avoid an escalation of crisis before all the facts of an incident were public.

“In this case, it makes sense to pay attention to the restrained and far more professional response of the American side and the American president,” Peskov said, according to the Russian state-run news agency Tass.

In the hours after the strike was first reported, Biden convened a group of G20 leaders in a closed-door meeting in Bali to coordinate a response, which was followed shortly after with comments from newly installed British Prime Minister Rishi Sunak describing the strike as an incidental byproduct of the “cruel and unrelenting reality of Putin’s war.”

Later in the day, Biden’s National Security Council spokesperson Adrienne Watson released a statement expressing sympathies for Poland, while stating Ukraine’s use of missiles to counteract the Russian assault was justified.

“Whatever the final conclusions may be, it is clear that the party ultimately responsible for this tragic incident is Russia, which launched a barrage of missiles on Ukraine specifically intended to target civilian infrastructure,” Watson said in a statement on Wednesday. “Ukraine had and has every right to defend itself.”

Meanwhile, Polish President Andrezj Duda—a member of the nationalist (and very anti-Russian) Law and Justice Party—presented an unexpectedly calm front at the onset of the alleged attack, apparently calmed by Biden’s own expressions of solidarity.

“The Poles handled this well, and so did the Biden administration,” Daniel Fried, the former U.S. Ambassador to Poland under President Bill Clinton and a current fellow at the Atlantic Council, told Newsweek. “They reached out to the Poles immediately and made sure they knew the U.S. had their back. Instead of being cool or dismissing the Poles’ concerns or playing down…the American’s first instinct was to say ‘we stand with our allies.’ And then, because they were acting in such solidarity, the Biden people were in a position to say ’let’s get the facts.’ And the Poles agreed.”

Michael Butler, an associate professor of political science at Clark University who specializes in negotiation and mediation, told Newsweek that the Western response was demonstrative of the strength of the NATO alliance and its role in bolstering non-proliferation efforts in eastern Europe, particularly after what appeared to be a clear provocation by the Russian side.

Fried, a former National Security Council adviser, said that before Tuesday there had not been a similar test to NATO’s security since the days of the Cold War, and never during an active conflict.

Biden’s measured response, as well as that of Jake Sullivan, his National Security adviser, was noteworthy in the fact it did not seek to escalate the conflict, preserving the status quo in a war Russia already seemed to be losing.

“There’s clearly a recognition by all parties that war is unpredictable and rife with the potential for these kinds of incidents,” Butler said.

In particular, Butler highlighted the role of Duda, who he said appeared to shy away from the rhetoric often deployed by his party that could have led to a more belligerent response.

“The strength of the alliance hinges on exactly this kind of collective voice,” said Butler. “Poland has exerted its own leadership within NATO on this matter, and that’s a big part of the response we’ve seen thus far.”

But some also highlighted the contrasts Biden’s response bore to former President Donald Trump, who blamed Russia for firing the missiles during a speech Tuesday night announcing his 2024 campaign for president.

While Trump has often emphasized a “peace through strength” posture on the campaign trail and while in office, the former president notably threatened nuclear war after a series of missile tests by the North Korean government in 2017 and ordered the assassination of top Iranian general Qasem Soleimani in 2020 following an attack on a U.S. embassy by Iranian-backed militias in Iraq.

That decision resulted in Iran firing a retaliatory missile strike on an American military base that wounded 110 soldiers. U.S. officials told members of Congress Tuesday that the country has continued to inspire plots of retaliation against U.S. citizens and officials.

“Dearly glad we have Biden, and not Trump, when we have this kind of serious security crisis, re missile strikes across Poland border, which require a steady hand, a lot of experience, and an adult,” Laura Rozen, a longtime foreign policy journalist who closely covered the Trump administration, tweeted Wednesday.