Mahmoud Ahmadinejad credited Iran's young scientists with the achievement in a speech in the southwestern border town of Khorramshahr on Wednesday.
"Today, Iran has mastered the entire nuclear fuel cycle, from start to finish, thanks to young Iranian scientists," he said.
"The enemies are looking to plot and want to create differences among Iranians to stop us getting our rights," Ahmadinejad said.
"But if they do the slightest damage to the Iranian people, if they commit the slightest aggression, they will recieve an historic slap."
The president was speaking during commemorations of the 1982 recapture from Iraqi forces of Khorramshahr, one of the bloodiest battles of the 1980-88 Iran-Iraq war.
Ahmadinejad's comments came as the permanent members of the UN Security Council and Germany were to meet in London for fresh efforts to agree on a strategy to confront Tehran's nuclear programme.
Iran says it wants to use the fuel cycle only to make civilian reactor fuel, although the same technology can be extended to making atomic weapons.
The European Union's 'big three' - Britain, France and Germany - are hoping to coax Iran into suspending uranium enrichment work in exchange for a package of trade and technology incentives.
However, they want Russia and China to join in sanctions, including an arms embargo, if Iran does not agree, according to a draft proposal.