Tehran says it hopes for more talks but will not discuss halting uranium enrichment.
Western powers have offered Tehran a package of economic and other incentives to stop enrichment, which can have civilian or military uses.
Iran’s chief nuclear negotiator met the the six negotiating powers – the United States, Russia, China, Britain, France and Germany – in Geneva on July 19, where he was reportedly told that Tehran had two weeks to respond.
Iran says it is ready for negotiations but will not accept any pre-conditions or threats in a row that has helped send oil prices sharply higher, despite falls in the last two weeks.
“Iran does not negotiate with anyone over its obvious nuclear right,” Ahmadinejad said.
Iran, the world’s fourth-largest crude producer, says its nuclear activities are aimed solely at generating electricity.
The UN Security Council has imposed three sets of sanctions in a stand-off that goes back to the revelation in 2002 by an exiled opposition group of the existence of a uranium enrichment facility and heavy water plant in Iran.
Iran says it aims eventually to have 50,000 centrifuges to produce fuel for a planned network of power plants.
The UN nuclear watchdog, the International Atomic Energy Agency (IAEA), said in May that Tehran had 3,500 centrifuges working at its Natanz facility in central Iran.
In April, it said that it had started installing 6,000 new centrifuges at Natanz and testing a more advanced model.
If running smoothly for long periods, 3,000 would be enough to make material for a warhead in a year, Western experts say.
The United States has warned Iran that it will face more sanctions if it fails to meet the two-week deadline.
Meanwhile, the US has not ruled out military action if diplomacy were to fail.