In his first remarks since Friday, when he delivered a speech broadcast on state media after Israel began bombarding Iran, Khamenei said peace or war could not be imposed on the Islamic Republic.
"Intelligent people who know Iran, the Iranian nation, and its history will never speak to this nation in threatening language because the Iranian nation will not surrender," he said in a statement read by a state TV anchor on Wednesday.
"The Americans should know that any US military intervention will undoubtedly be accompanied by irreparable damage."
Thousands of people were fleeing Tehran on Wednesday after Israeli warplanes bombed the city overnight, and a source said Trump was considering options that include joining Israel in attacking Iranian nuclear sites.
Israel's military said 50 Israeli jets had struck about 20 targets in Tehran overnight, including a facility used to make uranium centrifuges and another that made missile components.
A source familiar with internal discussions said Trump and his team were considering a number of options, which included joining Israel in strikes against Iranian nuclear sites.
Iran responded with a fresh volley of missiles at Israel.
Roads north out of Tehran were jammed with traffic.
Iran had conveyed to Washington that it would retaliate against the United States for any direct participation, its ambassador to the United Nations in Geneva, Ali Bahreini, said.
He said he already saw the US as "complicit in what Israel is doing".
A flurry of social media posts from Trump on Tuesday, including a demand for Iran's "UNCONDITIONAL SURRENDER!" and a post musing about killing Supreme Leader Ali Khamenei, increased speculation that he could bring the United States into the war.
With Khamenei's main military and security advisers killed by Israeli strikes, the leader's inner circle has been narrowed, raising the risk that he could make strategic errors, according to five people familiar with his decision-making process.
Iranian officials have reported at least 224 deaths, mostly civilians, though that toll has not been updated for days.
In Israel, Iran's retaliatory strikes are the first time in decades of shadow war and proxy conflict that a significant number of missiles fired from Iran have penetrated defences, killing Israelis in their homes.
Since Friday, Iran has fired about 400 missiles at Israel, some 40 of which have pierced through air defences, killing 24 people, all of them civilians, according to Israeli authorities.
Explosions were heard over Tel Aviv on Wednesday.
The military said two barrages of Iranian missiles were launched towards Israel in the first two hours of Wednesday morning.
Trump's social media posts - which have ranged from diplomatic offers to end the war to threats to join it - have created uncertainty over his intentions.
The US has so far taken only indirect actions in the conflict, including helping to shoot down missiles fired towards Israel.
But Washington has capabilities that Israel lacks, including massive bombs able to destroy Iran's nuclear enrichment plant, built deep under a mountain at Fordow.
On Tuesday Trump mused about killing Khamenei: "We know exactly where the so-called 'Supreme Leader' is hiding," he wrote on Truth Social.
"We are not going to take him out (kill!), at least not for now ... Our patience is wearing thin."
Three minutes later Trump posted, "UNCONDITIONAL SURRENDER!"
The US was deploying more fighter aircraft to the Middle East and extending the deployment of other warplanes, three US officials told Reuters.
Iran, for its part, has lost much of its capability to retaliate against Israel through proxy fighters close to Israeli borders during the past 20 months of Israel's war in Gaza.
Israel has pounded Iranian allies Hamas in Gaza and Hezbollah in Lebanon. Syrian leader Bashar al-Assad, propped up by Iran through 13 years of war, was toppled in 2024.
with AP