Speaking during a visit to Benin, the first stop on a three-nation tour, Ahmadinejad called nuclear energy a "divine gift" providing affordable electricity.
"They accuse Iran, like all nations that seek to rapidly find their way out of the current domination," the Iranian leader said through an interpreter in a speech at a Benin university.
"We don't need an atomic bomb. … And besides, it is not atomic bombs that threaten the world, but Western morals and culture declining in values."
Western powers suspect Tehran of covertly developing the capacity to produce a nuclear bomb. Iran denies this and says its programme is for energy and medical purposes.
On Tuesday, Iran unveiled a new uranium production facility and two mines, only days after talks with world powers on its nuclear programme again ended in deadlock.
Ahmadinejad, who arrived in Benin on Sunday night, was due later on Monday to travel to neighbouring Niger, one of the world's top producers of uranium.
Iran needs uranium for its nuclear programme, and Niger recently criticised a longstanding agreement with France – which gets most of its uranium from the former colony – demanding a bigger share of the profits from uranium ore mining.
Uranium from landlocked Niger is trucked to Benin ports for export, but Benin's foreign minister has insisted that uranium was not on the agenda for his Benin visit. Talks in Benin were to focus particularly on energy, agriculture and education, Benin officials have said.
Ahmadinejad will travel to Ghana on Tuesday following his visit to Niger for the final leg of the tour. During his speech at the university, Ahmadinejad condemned what he called colonialist thinking from wealthy nations that exploit poorer countries.
"Colonialist thinking has not yet disappeared," he said. "Only the method has changed, but the system is still there."
"To save their economy, they impose war everywhere to cover their failure, the failure of the capitalist system," said Ahmadinejad, who is due to leave office after June elections. In Niger, the Iranian president's visit was being welcomed by those who said the impoverished country should search for new partners in the sale of its uranium.
"We must from now on adhere to policies in our own interests, in selling our uranium to who we want, including Iran," Nouhou Arzika, a prominent civil society activist in Niger, told AFP. Niger's foreign minister visited Tehran in February.
Iran and Africa
The African country is the world's fourth-largest producer of uranium. The head of the student union at Niger's University of Niamey welcomed the Iranian leader's visit. The union previously organised a protest against French nuclear energy giant Areva.
"We are a sovereign state and will deal with who we want," Mahamadou Djibo Samaila told reporters. "Our uranium, our oil, we are going to sell them to who we want."
Iran's relations with African countries have not always been smooth. A diplomatic dispute hurt ties between Iran and Nigeria, Africa's most populous nation and largest oil producer, when weapons shipped from Iran were seized at a Lagos port in October 2010.
An alleged Iranian Revolutionary Guard member was accused of being one of the suspects behind the shipment, which Iran said was destined for Gambia, though Banjul denied being the intended recipient. The weapons had been labelled as building materials. – AFP