Iranian Supreme Leader Ayatollah Ali Khamenei released a video published to YouTube this week in which he warned of an American defeat in any war with Iran.

The clip — published September 13 to Khamenei’s official YouTube channel — is entitled “If Any War Happens.” It features Khamenei’s voice and is accompanied by English subtitles.

The video was viewed almost half a million times by September 18.

The clip begins by showing an image of US President Barack Obama sitting down for an interview in which he says that the US will not have a problem “knocking out [Iran’s] military with speed and dispatch if we choose to,” after which Khamenei’s voice appears to dismiss such a warning, calling it “boasting among strangers,” according to a translation provided in a report by MEMRI — the Middle East Media Research Institute.

The supreme leader then advises the Americans to “use their experiences [in the Middle East] correctly” as images play of suggested American “failures” in the background including photos of the advanced American RQ-170 drone that Iran brought down on its soil in December 2011; a photo of Hezbollah leader Hassan Nasrallah against a backdrop of a man flying the Hezbollah flag atop a missile and a mention of the Second Lebanon War in 2006; depictions of US forces being bombed in Afghanistan; and images of US forces carrying a coffin with the text “2003-2011 Iraq war” above it.

“We neither welcome nor begin any war. They must know that should any war break out, one who will emerge humiliated out of it will be invading and criminal America,” says Khamenei, according to the English subtitles.

In the background of the clip, a crowd says: “We will stand until the end, Khamenei is the leader.”

The Iranian leader has issued several threats against the US — and Israel — following the Iranian nuclear deal signed July 14 with world powers, which allows for sanctions relief in exchange for Iran curbing its controversial nuclear program and submitting to inspections.

The US is set to start implementing the deal October 18, but it is not yet clear when punitive measures will be lifted, as the International Atomic Energy Agency must first ensure Iranian compliance with the accord.