Khamenei is the ultimate decision maker in Iran and has the final say on all key issues, including its controversial nuclear programme, a major source of concern in the West over suspicions the Islamic republic is using it to develop weapons.
"Some (candidates) have the wrong analysis that by giving concessions to enemies, their anger towards Iran will be reduced," Khamenei said in a live televised speech. "This is a mistake."
His remarks came as Iran prepares for elections on June 14 to replace President Mahmoud Ahmadinejad, during whose tenure the country has been hit by severe international sanctions, sparking a serious economic crisis.
The eight presidential candidates, approved by the hardline electoral oversight body the Guardians Council, most of whom are conservatives close to Khamenei, were present at his speech marking the death of the Islamic revolution`s late founder, Ayatollah Ruhollah Khomeini.
Addressing them directly, Khamenei said regardless of who wins the poll, they should "promise not to attach importance to the interests of foreigners more than they do to those of the Iranians."
"If we can shore up the economy, the enemy will be left defenceless in its confrontation with the Iranian nation," said Khamenei, branding Iran`s ailing economy as the "main issue" before the candidates.
He also said Iran must build up its "national might" against Western hostility.
Among the candidates attending the ceremony were top nuclear negotiator Saeed Jalili, who represents Iran in talks with the so-called P5+1 countries of the United States, Britain, China, France and Russia plus Germany aimed at curbing the Iranian nuclear programme.
Those talks have failed to produce a breakthrough.
Ali Akbar Velayati, a former Iranian foreign minister of 16 years and Hassan Rowhani, an ex-nuclear negotiator, were also present at the speech, both of whom have vowed to resolve the nuclear issue using their diplomatic record.