"A nation that wants to reach independence must pay a price. If it wants to preserve its rights against bullies, then it has to pay a price."
Khamenei's speech was interrupted by chants of "nuclear energy is our natural right" and "death to America".
He said: "It cannot sit in a corner and expect development and progress."
Khamenei's speech comes at a crucial moment in the crisis over Iran's nuclear programme, with the US and Western powers pushing for a third set of UN sanctions to punish Tehran for its nuclear defiance.
Talks between Javier Solana, the EU foreign policy chief, and Ali Larijani, Irania's chief nuclear negotiator, last week ended with both sides seemingly sticking defiantly to their positions.
Condoleezza Rice, the US secretary of state, has said that the "only question" worth discussing was whether Iran was prepared to suspend uranium enrichment.
"Iranians should not beg for their right to obtain nuclear energy. They should not beg to the domineering world powers"
Ayatollah Khameini, Supreme leader of Iran
On a platform above crowds of listeners, Khamenei scoffed at the notion of Iran "begging" to Western powers to allow its nuclear drive to continue.
"Iranians should not beg for their right to obtain nuclear energy. They should not beg to the domineering world powers. This is not the way of an independent and free nation."
Despite Khameini's tough words, Ali Reza Ronaghi, Al Jazeera's Tehran correspondent, said that Iran's supreme leader's words were not as strong, nor as forthcoming as was expected.
He said many people expected Iran's supreme leader to talk about Iran's negotiations with the US and the EU, which are currently under way.
Tehran insists it wants only to generate energy for a growing population and its leaders have vowed they will hit back hard against any attack on atomic installations.
Khamenei also decried conflicts between Shia and Sunni which he said were a Western plot aimed at sowing divisions among Muslims.
He said: "Staining your hands with the blood of a Muslim brother is an unforgivable sin which some are doing in the name of Islam.
"This is abandoning Islam. A war between Shia and Sunni is one of the enemies' biggest plots."
On Sunday, Mahmoud Ahmadinejad, the president on Iran, launched a fresh verbal attack on Israel, saying that last summer's war between Israel and Lebanese group Hezbollah started a "countdown" that will end with Lebanese and Palestinian fighters destroying Israel.